diff --git a/src/Security/Security.Autorest/.gitattributes b/src/Security/Security.Autorest/.gitattributes new file mode 100644 index 000000000000..2125666142eb --- /dev/null +++ b/src/Security/Security.Autorest/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/src/Security/Security.Autorest/.gitignore b/src/Security/Security.Autorest/.gitignore new file mode 100644 index 000000000000..3c3d57339c8b --- /dev/null +++ b/src/Security/Security.Autorest/.gitignore @@ -0,0 +1,16 @@ +bin +obj +.vs +generated +internal +exports +tools +custom/*.psm1 +custom/autogen-model-cmdlets +test/*-TestResults.xml +/*.ps1 +/*.ps1xml +/*.psm1 +/*.snk +/*.csproj +/*.nuspec \ No newline at end of file diff --git a/src/Security/Security.Autorest/Az.Security.psd1 b/src/Security/Security.Autorest/Az.Security.psd1 new file mode 100644 index 000000000000..d2a355dfd745 --- /dev/null +++ b/src/Security/Security.Autorest/Az.Security.psd1 @@ -0,0 +1,23 @@ +@{ + GUID = '6f1c0dfd-dfcd-4e5b-b77c-a64a9d355ebf' + RootModule = './Az.Security.psm1' + ModuleVersion = '1.5.1' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: Security cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.Security.private.dll' + FormatsToProcess = './Az.Security.format.ps1xml' + FunctionsToExport = 'Get-AzSecurityApiCollection', 'Get-AzSecurityConnector', 'Get-AzSecurityConnectorAzureDevOpsOrg', 'Get-AzSecurityConnectorAzureDevOpsOrgAvailable', 'Get-AzSecurityConnectorAzureDevOpsProject', 'Get-AzSecurityConnectorAzureDevOpsRepo', 'Get-AzSecurityConnectorDevOpsConfiguration', 'Get-AzSecurityConnectorGitHubOwner', 'Get-AzSecurityConnectorGitHubOwnerAvailable', 'Get-AzSecurityConnectorGitHubRepo', 'Get-AzSecurityConnectorGitLabGroup', 'Get-AzSecurityConnectorGitLabGroupAvailable', 'Get-AzSecurityConnectorGitLabProject', 'Get-AzSecurityConnectorGitLabSubgroup', 'Invoke-AzSecurityApiCollectionApimOffboard', 'Invoke-AzSecurityApiCollectionApimOnboard', 'New-AzSecurityAwsEnvironmentObject', 'New-AzSecurityAwsOrganizationalDataMasterObject', 'New-AzSecurityAwsOrganizationalDataMemberObject', 'New-AzSecurityAzureDevOpsScopeEnvironmentObject', 'New-AzSecurityConnector', 'New-AzSecurityConnectorActionableRemediationObject', 'New-AzSecurityConnectorDevOpsConfiguration', 'New-AzSecurityCspmMonitorAwsOfferingObject', 'New-AzSecurityCspmMonitorAzureDevOpsOfferingObject', 'New-AzSecurityCspmMonitorGcpOfferingObject', 'New-AzSecurityCspmMonitorGithubOfferingObject', 'New-AzSecurityCspmMonitorGitLabOfferingObject', 'New-AzSecurityDefenderCspmAwsOfferingObject', 'New-AzSecurityDefenderCspmGcpOfferingObject', 'New-AzSecurityDefenderForContainersAwsOfferingObject', 'New-AzSecurityDefenderForContainersGcpOfferingObject', 'New-AzSecurityDefenderForDatabasesAwsOfferingObject', 'New-AzSecurityDefenderForDatabasesGcpOfferingObject', 'New-AzSecurityDefenderForServersAwsOfferingObject', 'New-AzSecurityDefenderForServersGcpOfferingObject', 'New-AzSecurityGcpOrganizationalDataMemberObject', 'New-AzSecurityGcpOrganizationalDataOrganizationObject', 'New-AzSecurityGcpProjectEnvironmentObject', 'New-AzSecurityGitHubScopeEnvironmentObject', 'New-AzSecurityGitLabScopeEnvironmentObject', 'New-AzSecurityInformationProtectionAwsOfferingObject', 'Remove-AzSecurityConnector', 'Remove-AzSecurityConnectorDevOpsConfiguration', 'Update-AzSecurityConnector', 'Update-AzSecurityConnectorAzureDevOpsOrg', 'Update-AzSecurityConnectorAzureDevOpsProject', 'Update-AzSecurityConnectorAzureDevOpsRepo', 'Update-AzSecurityConnectorDevOpsConfiguration' + PrivateData = @{ + PSData = @{ + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Security' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } +} diff --git a/src/Security/Security.Autorest/README.md b/src/Security/Security.Autorest/README.md new file mode 100644 index 000000000000..58c4ff296c32 --- /dev/null +++ b/src/Security/Security.Autorest/README.md @@ -0,0 +1,187 @@ + +# Az.Security +This directory contains the PowerShell module for the Security service. + +--- +## Status +[![Az.Security](https://img.shields.io/powershellgallery/v/Az.Security.svg?style=flat-square&label=Az.Security "Az.Security")](https://www.powershellgallery.com/packages/Az.Security/) + +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.Security`, see [how-to.md](how-to.md). + + +### AutoRest Configuration +> see https://aka.ms/autorest + +### +``` yaml +commit: 6c4497e6b0aaad8127f2dd50fa8a29aaf68f24e6 +require: + - $(this-folder)/../../readme.azure.noprofile.md +input-file: + - $(repo)/specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/securityConnectors.json + - $(repo)/specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/securityConnectorsDevOps.json + - $(repo)/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json + +title: Security +module-version: 1.5.1 +subject-prefix: $(service-name) +enable-parent-pipeline-input: false + +directive: + - rename-model: + from: EnvironmentData + to: SecurityConnectorEnvironment + - rename-model: + from: AwsEnvironmentData + to: AwsEnvironment + - rename-model: + from: GcpProjectEnvironmentData + to: GcpProjectEnvironment + - rename-model: + from: AzureDevOpsScopeEnvironmentData + to: AzureDevOpsScopeEnvironment + - rename-model: + from: GitlabScopeEnvironmentData + to: GitLabScopeEnvironment + - rename-model: + from: GithubScopeEnvironmentData + to: GitHubScopeEnvironment + + - from: securityConnectors.json + where: $.definitions + debug: true + transform: > + $.defenderFoDatabasesAwsOffering['x-ms-client-name'] = 'DefenderForDatabasesAwsOffering' + + - from: types.json + where: $.definitions.Kind + transform: > + $['x-ms-client-name'] = 'ResourceKind'; + + - from: apiCollections.json + where: $.paths..operationId + transform: > + return $.replace(/OffboardAzureApiManagementApi$/g, "ApiCollectionAPIM_Delete") + + - where: + verb: Invoke + subject: ^AzureApiCollection$ + set: + subject: ApiCollectionApimOnboard + + - where: + verb: Remove + subject: ^ApiCollectionApim$ + set: + verb: Invoke + subject: ApiCollectionApimOffboard + + # New-* cmdlets, ViaIdentity is not required + - where: + variant: ^(Create|Update)(?!.*?Expanded|JsonFilePath|JsonString) + remove: true + - where: + variant: ^CreateViaIdentity.*$ + remove: true + + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + + - where: + subject: ^(DevOpsConfiguration|AzureDevOps|GitHub|GitLab)(.*) + set: + subject-prefix: SecurityConnector + + - where: + subject: (.*)(AzureDevOpsRepos)$ + set: + subject: $1AzureDevOpsRepo + + - where: + subject: (.*)(GitHubRepos)$ + set: + subject: $1GitHubRepo + + - where: + verb: New + subject: ^(AzureDevOpsOrg|AzureDevOpsProject|AzureDevOpsRepo)(.*) + remove: true + + - where: + subject: ^(DevOpsOperationResult)(.*) + remove: true + + - where: + subject: ^(DevOpsConfiguration|AzureDevOps|GitHub|GitLab)(.*) + parameter-name: ProvisioningState + hide: true + + - where: + verb: Update + subject: ^(AzureDevOps)(.*) + parameter-name: OnboardingState + hide: true + + - where: + model-name: SecurityConnector + set: + format-table: + properties: + - Name + - ResourceGroupName + - EnvironmentName + - Location + - HierarchyIdentifier + + - no-inline: + - SecurityConnectorEnvironment + - AwsOrganizationalData + - GcpOrganizationalData + - ActionableRemediation + + - model-cmdlet: + - model-name: AwsEnvironment + - model-name: AwsOrganizationalDataMaster + - model-name: AwsOrganizationalDataMember + - model-name: GcpProjectEnvironment + - model-name: GcpOrganizationalDataOrganization + - model-name: GcpOrganizationalDataMember + - model-name: AzureDevOpsScopeEnvironment + - model-name: GitLabScopeEnvironment + - model-name: GitHubScopeEnvironment + - model-name: CspmMonitorAwsOffering + - model-name: CspmMonitorGcpOffering + - model-name: CspmMonitorGithubOffering + - model-name: CspmMonitorAzureDevOpsOffering + - model-name: CspmMonitorGitLabOffering + - model-name: DefenderCspmAwsOffering + - model-name: DefenderCspmGcpOffering + - model-name: DefenderForContainersAwsOffering + - model-name: DefenderForContainersGcpOffering + - model-name: DefenderForDatabasesAwsOffering + - model-name: DefenderForDatabasesGcpOffering + - model-name: DefenderForServersAwsOffering + - model-name: DefenderForServersGcpOffering + - model-name: InformationProtectionAwsOffering + - model-name: ActionableRemediation + cmdlet-name: New-AzSecurityConnectorActionableRemediationObject +``` diff --git a/src/Security/Security.Autorest/UX/Microsoft.ApiManagement/service-apiCollections.json b/src/Security/Security.Autorest/UX/Microsoft.ApiManagement/service-apiCollections.json new file mode 100644 index 000000000000..cac1371c5a4e --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.ApiManagement/service-apiCollections.json @@ -0,0 +1,138 @@ +{ + "resourceType": "service/apiCollections", + "apiVersion": "2023-11-15", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityApiCollection", + "description": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs.\nIf an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityapicollection" + }, + "parameterSets": [ + { + "parameters": [ + "-ApiId ", + "-ResourceGroupName ", + "-ServiceName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "parameters": [ + { + "name": "-ApiId", + "value": "[Path.apiId]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-ServiceName", + "value": "[Path.serviceName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Invoke-AzSecurityApiCollectionApimOffboard", + "description": "Offboard an Azure API Management API from Microsoft Defender for APIs.\nThe system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/invoke-azsecurityapicollectionapimoffboard" + }, + "parameterSets": [ + { + "parameters": [ + "-ApiId ", + "-ResourceGroupName ", + "-ServiceName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.", + "parameters": [ + { + "name": "-ApiId", + "value": "[Path.apiId]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-ServiceName", + "value": "[Path.serviceName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Invoke-AzSecurityApiCollectionApimOnboard", + "description": "Onboard an Azure API Management API to Microsoft Defender for APIs.\nThe system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/invoke-azsecurityapicollectionapimonboard" + }, + "parameterSets": [ + { + "parameters": [ + "-ApiId ", + "-ResourceGroupName ", + "-ServiceName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "parameters": [ + { + "name": "-ApiId", + "value": "[Path.apiId]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-ServiceName", + "value": "[Path.serviceName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs-projects-repos.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs-projects-repos.json new file mode 100644 index 000000000000..19fdc4d4e2f2 --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs-projects-repos.json @@ -0,0 +1,62 @@ +{ + "resourceType": "securityConnectors/azureDevOpsOrgs/projects/repos", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorAzureDevOpsRepo", + "description": "Returns a monitored Azure DevOps repository resource.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos/{repoName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsrepo" + }, + "parameterSets": [ + { + "parameters": [ + "-OrgName ", + "-ProjectName ", + "-RepoName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored Azure DevOps repository resource.", + "parameters": [ + { + "name": "-OrgName", + "value": "[Path.orgName]" + }, + { + "name": "-ProjectName", + "value": "[Path.projectName]" + }, + { + "name": "-RepoName", + "value": "[Path.repoName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs-projects.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs-projects.json new file mode 100644 index 000000000000..cb182ff966ff --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs-projects.json @@ -0,0 +1,57 @@ +{ + "resourceType": "securityConnectors/azureDevOpsOrgs/projects", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorAzureDevOpsProject", + "description": "Returns a monitored Azure DevOps project resource.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsproject" + }, + "parameterSets": [ + { + "parameters": [ + "-OrgName ", + "-ProjectName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored Azure DevOps project resource.", + "parameters": [ + { + "name": "-OrgName", + "value": "[Path.orgName]" + }, + { + "name": "-ProjectName", + "value": "[Path.projectName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs.json new file mode 100644 index 000000000000..3c5f2a744375 --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-azureDevOpsOrgs.json @@ -0,0 +1,52 @@ +{ + "resourceType": "securityConnectors/azureDevOpsOrgs", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorAzureDevOpsOrg", + "description": "Returns a monitored Azure DevOps organization resource.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsorg" + }, + "parameterSets": [ + { + "parameters": [ + "-OrgName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored Azure DevOps organization resource.", + "parameters": [ + { + "name": "-OrgName", + "value": "[Path.orgName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitHubOwners-repos.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitHubOwners-repos.json new file mode 100644 index 000000000000..a851a37d8a7c --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitHubOwners-repos.json @@ -0,0 +1,57 @@ +{ + "resourceType": "securityConnectors/gitHubOwners/repos", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorGitHubRepo", + "description": "Returns a monitored GitHub repository.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}/repos/{repoName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgithubrepo" + }, + "parameterSets": [ + { + "parameters": [ + "-OwnerName ", + "-RepoName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored GitHub repository.", + "parameters": [ + { + "name": "-OwnerName", + "value": "[Path.ownerName]" + }, + { + "name": "-RepoName", + "value": "[Path.repoName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitHubOwners.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitHubOwners.json new file mode 100644 index 000000000000..c4f40ff560d8 --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitHubOwners.json @@ -0,0 +1,52 @@ +{ + "resourceType": "securityConnectors/gitHubOwners", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorGitHubOwner", + "description": "Returns a monitored GitHub owner.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgithubowner" + }, + "parameterSets": [ + { + "parameters": [ + "-OwnerName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored GitHub owner.", + "parameters": [ + { + "name": "-OwnerName", + "value": "[Path.ownerName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitLabGroups-projects.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitLabGroups-projects.json new file mode 100644 index 000000000000..a479a7df06dd --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitLabGroups-projects.json @@ -0,0 +1,57 @@ +{ + "resourceType": "securityConnectors/gitLabGroups/projects", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorGitLabProject", + "description": "Returns a monitored GitLab Project resource for a given fully-qualified group name and project name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/projects/{projectName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgitlabproject" + }, + "parameterSets": [ + { + "parameters": [ + "-GroupFqName ", + "-ProjectName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored GitLab Project resource for a given fully-qualified group name and project name.", + "parameters": [ + { + "name": "-GroupFqName", + "value": "[Path.groupFQName]" + }, + { + "name": "-ProjectName", + "value": "[Path.projectName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitLabGroups.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitLabGroups.json new file mode 100644 index 000000000000..947f059620ef --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors-gitLabGroups.json @@ -0,0 +1,52 @@ +{ + "resourceType": "securityConnectors/gitLabGroups", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorGitLabGroup", + "description": "Returns a monitored GitLab Group resource for a given fully-qualified name.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgitlabgroup" + }, + "parameterSets": [ + { + "parameters": [ + "-GroupFqName ", + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Returns a monitored GitLab Group resource for a given fully-qualified name.", + "parameters": [ + { + "name": "-GroupFqName", + "value": "[Path.groupFQName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors.json b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors.json new file mode 100644 index 000000000000..55f55e7c98ca --- /dev/null +++ b/src/Security/Security.Autorest/UX/Microsoft.Security/securityConnectors.json @@ -0,0 +1,161 @@ +{ + "resourceType": "securityConnectors", + "apiVersion": "2023-09-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security" + }, + "commands": [ + { + "name": "Get-AzSecurityConnectorDevOpsConfiguration", + "description": "Gets a DevOps Configuration.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectordevopsconfiguration" + }, + "parameterSets": [ + { + "parameters": [ + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Gets a DevOps Configuration.", + "parameters": [ + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Get-AzSecurityConnector", + "description": "Retrieves details of a specific security connector", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnector" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Retrieves details of a specific security connector", + "parameters": [ + { + "name": "-Name", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzSecurityConnectorDevOpsConfiguration", + "description": "Deletes a DevOps Connector.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/remove-azsecurityconnectordevopsconfiguration" + }, + "parameterSets": [ + { + "parameters": [ + "-ResourceGroupName ", + "-SecurityConnectorName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Deletes a DevOps Connector.", + "parameters": [ + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SecurityConnectorName", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzSecurityConnector", + "description": "Deletes a security connector.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.security/remove-azsecurityconnector" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Deletes a security connector.", + "parameters": [ + { + "name": "-Name", + "value": "[Path.securityConnectorName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Security/Security.Autorest/custom/README.md b/src/Security/Security.Autorest/custom/README.md new file mode 100644 index 000000000000..9462ffd6b074 --- /dev/null +++ b/src/Security/Security.Autorest/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.Security` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Security.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.Security` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Security.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.Security.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.Security`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.Security.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.Security.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Security`. +- `Microsoft.Azure.PowerShell.Cmdlets.Security.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Security`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.Security.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/Security/Security.Autorest/docs/Az.Security.md b/src/Security/Security.Autorest/docs/Az.Security.md new file mode 100644 index 000000000000..af4d03d52727 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Az.Security.md @@ -0,0 +1,164 @@ +--- +Module Name: Az.Security +Module Guid: 6f1c0dfd-dfcd-4e5b-b77c-a64a9d355ebf +Download Help Link: https://learn.microsoft.com/powershell/module/az.security +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Security Module +## Description +Microsoft Azure PowerShell: Security cmdlets + +## Az.Security Cmdlets +### [Get-AzSecurityApiCollection](Get-AzSecurityApiCollection.md) +Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. +If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + +### [Get-AzSecurityConnector](Get-AzSecurityConnector.md) +Retrieves details of a specific security connector + +### [Get-AzSecurityConnectorAzureDevOpsOrg](Get-AzSecurityConnectorAzureDevOpsOrg.md) +Returns a monitored Azure DevOps organization resource. + +### [Get-AzSecurityConnectorAzureDevOpsOrgAvailable](Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md) +Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + +### [Get-AzSecurityConnectorAzureDevOpsProject](Get-AzSecurityConnectorAzureDevOpsProject.md) +Returns a monitored Azure DevOps project resource. + +### [Get-AzSecurityConnectorAzureDevOpsRepo](Get-AzSecurityConnectorAzureDevOpsRepo.md) +Returns a monitored Azure DevOps repository resource. + +### [Get-AzSecurityConnectorDevOpsConfiguration](Get-AzSecurityConnectorDevOpsConfiguration.md) +Gets a DevOps Configuration. + +### [Get-AzSecurityConnectorGitHubOwner](Get-AzSecurityConnectorGitHubOwner.md) +Returns a monitored GitHub owner. + +### [Get-AzSecurityConnectorGitHubOwnerAvailable](Get-AzSecurityConnectorGitHubOwnerAvailable.md) +Returns a list of all GitHub owners accessible by the user token consumed by the connector. + +### [Get-AzSecurityConnectorGitHubRepo](Get-AzSecurityConnectorGitHubRepo.md) +Returns a monitored GitHub repository. + +### [Get-AzSecurityConnectorGitLabGroup](Get-AzSecurityConnectorGitLabGroup.md) +Returns a monitored GitLab Group resource for a given fully-qualified name. + +### [Get-AzSecurityConnectorGitLabGroupAvailable](Get-AzSecurityConnectorGitLabGroupAvailable.md) +Returns a list of all GitLab groups accessible by the user token consumed by the connector. + +### [Get-AzSecurityConnectorGitLabProject](Get-AzSecurityConnectorGitLabProject.md) +Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + +### [Get-AzSecurityConnectorGitLabSubgroup](Get-AzSecurityConnectorGitLabSubgroup.md) +Gets nested subgroups of given GitLab Group which are onboarded to the connector. + +### [Invoke-AzSecurityApiCollectionApimOffboard](Invoke-AzSecurityApiCollectionApimOffboard.md) +Offboard an Azure API Management API from Microsoft Defender for APIs. +The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors. + +### [Invoke-AzSecurityApiCollectionApimOnboard](Invoke-AzSecurityApiCollectionApimOnboard.md) +Onboard an Azure API Management API to Microsoft Defender for APIs. +The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. + +### [New-AzSecurityAwsEnvironmentObject](New-AzSecurityAwsEnvironmentObject.md) +Create an in-memory object for AwsEnvironment. + +### [New-AzSecurityAwsOrganizationalDataMasterObject](New-AzSecurityAwsOrganizationalDataMasterObject.md) +Create an in-memory object for AwsOrganizationalDataMaster. + +### [New-AzSecurityAwsOrganizationalDataMemberObject](New-AzSecurityAwsOrganizationalDataMemberObject.md) +Create an in-memory object for AwsOrganizationalDataMember. + +### [New-AzSecurityAzureDevOpsScopeEnvironmentObject](New-AzSecurityAzureDevOpsScopeEnvironmentObject.md) +Create an in-memory object for AzureDevOpsScopeEnvironment. + +### [New-AzSecurityConnector](New-AzSecurityConnector.md) +Create a security connector. +If a security connector is already created and a subsequent request is issued for the same security connector id, then it will be updated. + +### [New-AzSecurityConnectorActionableRemediationObject](New-AzSecurityConnectorActionableRemediationObject.md) +Create an in-memory object for ActionableRemediation. + +### [New-AzSecurityConnectorDevOpsConfiguration](New-AzSecurityConnectorDevOpsConfiguration.md) +Create a DevOps Configuration. + +### [New-AzSecurityCspmMonitorAwsOfferingObject](New-AzSecurityCspmMonitorAwsOfferingObject.md) +Create an in-memory object for CspmMonitorAwsOffering. + +### [New-AzSecurityCspmMonitorAzureDevOpsOfferingObject](New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md) +Create an in-memory object for CspmMonitorAzureDevOpsOffering. + +### [New-AzSecurityCspmMonitorGcpOfferingObject](New-AzSecurityCspmMonitorGcpOfferingObject.md) +Create an in-memory object for CspmMonitorGcpOffering. + +### [New-AzSecurityCspmMonitorGithubOfferingObject](New-AzSecurityCspmMonitorGithubOfferingObject.md) +Create an in-memory object for CspmMonitorGithubOffering. + +### [New-AzSecurityCspmMonitorGitLabOfferingObject](New-AzSecurityCspmMonitorGitLabOfferingObject.md) +Create an in-memory object for CspmMonitorGitLabOffering. + +### [New-AzSecurityDefenderCspmAwsOfferingObject](New-AzSecurityDefenderCspmAwsOfferingObject.md) +Create an in-memory object for DefenderCspmAwsOffering. + +### [New-AzSecurityDefenderCspmGcpOfferingObject](New-AzSecurityDefenderCspmGcpOfferingObject.md) +Create an in-memory object for DefenderCspmGcpOffering. + +### [New-AzSecurityDefenderForContainersAwsOfferingObject](New-AzSecurityDefenderForContainersAwsOfferingObject.md) +Create an in-memory object for DefenderForContainersAwsOffering. + +### [New-AzSecurityDefenderForContainersGcpOfferingObject](New-AzSecurityDefenderForContainersGcpOfferingObject.md) +Create an in-memory object for DefenderForContainersGcpOffering. + +### [New-AzSecurityDefenderForDatabasesAwsOfferingObject](New-AzSecurityDefenderForDatabasesAwsOfferingObject.md) +Create an in-memory object for DefenderForDatabasesAwsOffering. + +### [New-AzSecurityDefenderForDatabasesGcpOfferingObject](New-AzSecurityDefenderForDatabasesGcpOfferingObject.md) +Create an in-memory object for DefenderForDatabasesGcpOffering. + +### [New-AzSecurityDefenderForServersAwsOfferingObject](New-AzSecurityDefenderForServersAwsOfferingObject.md) +Create an in-memory object for DefenderForServersAwsOffering. + +### [New-AzSecurityDefenderForServersGcpOfferingObject](New-AzSecurityDefenderForServersGcpOfferingObject.md) +Create an in-memory object for DefenderForServersGcpOffering. + +### [New-AzSecurityGcpOrganizationalDataMemberObject](New-AzSecurityGcpOrganizationalDataMemberObject.md) +Create an in-memory object for GcpOrganizationalDataMember. + +### [New-AzSecurityGcpOrganizationalDataOrganizationObject](New-AzSecurityGcpOrganizationalDataOrganizationObject.md) +Create an in-memory object for GcpOrganizationalDataOrganization. + +### [New-AzSecurityGcpProjectEnvironmentObject](New-AzSecurityGcpProjectEnvironmentObject.md) +Create an in-memory object for GcpProjectEnvironment. + +### [New-AzSecurityGitHubScopeEnvironmentObject](New-AzSecurityGitHubScopeEnvironmentObject.md) +Create an in-memory object for GitHubScopeEnvironment. + +### [New-AzSecurityGitLabScopeEnvironmentObject](New-AzSecurityGitLabScopeEnvironmentObject.md) +Create an in-memory object for GitLabScopeEnvironment. + +### [New-AzSecurityInformationProtectionAwsOfferingObject](New-AzSecurityInformationProtectionAwsOfferingObject.md) +Create an in-memory object for InformationProtectionAwsOffering. + +### [Remove-AzSecurityConnector](Remove-AzSecurityConnector.md) +Deletes a security connector. + +### [Remove-AzSecurityConnectorDevOpsConfiguration](Remove-AzSecurityConnectorDevOpsConfiguration.md) +Deletes a DevOps Connector. + +### [Update-AzSecurityConnector](Update-AzSecurityConnector.md) +Updates a security connector + +### [Update-AzSecurityConnectorAzureDevOpsOrg](Update-AzSecurityConnectorAzureDevOpsOrg.md) +Updates monitored Azure DevOps organization details. + +### [Update-AzSecurityConnectorAzureDevOpsProject](Update-AzSecurityConnectorAzureDevOpsProject.md) +Updates a monitored Azure DevOps project resource. + +### [Update-AzSecurityConnectorAzureDevOpsRepo](Update-AzSecurityConnectorAzureDevOpsRepo.md) +Updates a monitored Azure DevOps repository resource. + +### [Update-AzSecurityConnectorDevOpsConfiguration](Update-AzSecurityConnectorDevOpsConfiguration.md) +Updates a DevOps Configuration. + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityApiCollection.md b/src/Security/Security.Autorest/docs/Get-AzSecurityApiCollection.md new file mode 100644 index 000000000000..1ee5691cdfdc --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityApiCollection.md @@ -0,0 +1,215 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityapicollection +schema: 2.0.0 +--- + +# Get-AzSecurityApiCollection + +## SYNOPSIS +Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. +If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityApiCollection [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSecurityApiCollection -ApiId -ResourceGroupName -ServiceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSecurityApiCollection -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzSecurityApiCollection -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### List2 +``` +Get-AzSecurityApiCollection -ResourceGroupName -ServiceName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. +If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + +## EXAMPLES + +### Example 1: Get a specific onboarded api collection resource +```powershell +Get-AzSecurityApiCollection -ResourceGroupName apicollectionstests -ServiceName "demoapimservice2" -ApiId "echo-api" +``` + +```output +BaseUrl : https://demoapimservice2.azure-api.net/echo +DiscoveredVia : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapim + service2 +DisplayName : Echo API +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapim + service2/providers/Microsoft.Security/apiCollections/echo-api +Name : echo-api +NumberOfApiEndpoint : 6 +NumberOfApiEndpointsWithSensitiveDataExposed : 0 +NumberOfExternalApiEndpoint : 0 +NumberOfInactiveApiEndpoint : 6 +NumberOfUnauthenticatedApiEndpoint : 0 +ProvisioningState : Succeeded +ResourceGroupName : apicollectionstests +SensitivityLabel : +Type : microsoft.security/apicollections +``` + + + +### Example 2: List onboarded api collections by service name +```powershell +Get-AzSecurityApiCollection -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2" +``` + +```output +Name ResourceGroupName +---- ----------------- +echo-api apicollectionstests +echo-api-2 apicollectionstests +``` + + + +### Example 3: List onboarded api collections by subscription +```powershell +Get-AzSecurityApiCollection +``` + +```output +Name ResourceGroupName +---- ----------------- +echo-api apicollectionstests +echo-api-2 apicollectionstests +``` + + + +## PARAMETERS + +### -ApiId +API revision identifier. +Must be unique in the API Management service instance. +Non-current revision has ;rev=n as a suffix where n is the revision number. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1, List2 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceName +The name of the API Management service. + +```yaml +Type: System.String +Parameter Sets: Get, List2 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1, List2 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IApiCollection + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnector.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnector.md new file mode 100644 index 000000000000..24faa9cde938 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnector.md @@ -0,0 +1,186 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnector +schema: 2.0.0 +--- + +# Get-AzSecurityConnector + +## SYNOPSIS +Retrieves details of a specific security connector + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnector [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSecurityConnector -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnector -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzSecurityConnector -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Retrieves details of a specific security connector + +## EXAMPLES + +### Example 1: Get Security Connector resource by name +```powershell +Get-AzSecurityConnector -ResourceGroupName "dfdtest-sdk" -Name "dfdsdktests-azdo-01" +``` + +```output +EnvironmentData : { + "environmentType": "AzureDevOpsScope" + } +EnvironmentName : AzureDevOps +Etag : +HierarchyIdentifier : 4a8eb7f1-f533-48c5-b102-9b09e90906b7 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01 +Kind : +Location : centralus +Name : dfdsdktests-azdo-01 +Offering : {{ + "offeringType": "CspmMonitorAzureDevOps" + }} +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : 12/7/2023 6:38:36 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/14/2024 2:11:46 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : {} +Type : Microsoft.Security/securityconnectors +``` + + + +### Example 2: List Security Connectors by subscription +```powershell +Get-AzSecurityConnector +``` + +```output +Name ResourceGroupName EnvironmentName Location HierarchyIdentifier +---- ----------------- --------------- -------- ------------------- +dfdsdktests-azdo-01 dfdtest-sdk AzureDevOps centralus 4a8eb7f1-f533-48c5-b102-9b09e90906b7 +dfdsdktests-gl-01 dfdtest-sdk GitLab centralus 7a1f4efe-f8c6-48e7-b7ef-1b45994ed602 +dfdsdktests-gh-01 dfdtest-sdk Github centralus bc12ba4d-b89c-486e-85e1-d803e7d80525 +aws-sdktest01 securityconnectors-tests AWS CentralUS 891376984375 +gcp-sdktest01 securityconnectors-tests GCP CentralUS 843025268399 +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SecurityConnectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group within the user's subscription. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityConnector + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsOrg.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsOrg.md new file mode 100644 index 000000000000..2d4d61607306 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsOrg.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsorg +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorAzureDevOpsOrg + +## SYNOPSIS +Returns a monitored Azure DevOps organization resource. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSecurityConnectorAzureDevOpsOrg -OrgName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorAzureDevOpsOrg -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored Azure DevOps organization resource. + +## EXAMPLES + +### Example 1: Get discovered AzureDevOps organization by name +```powershell +Get-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:49:40 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs +``` + + + +### Example 2: List discovered AzureDevOps organizations +```powershell +Get-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests dfdtest-sdk +dfdsdktests2 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OrgName +The Azure DevOps organization name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsOrg + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md new file mode 100644 index 000000000000..1bc3d3dd03ae --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsorgavailable +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorAzureDevOpsOrgAvailable + +## SYNOPSIS +Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + +## SYNTAX + +``` +Get-AzSecurityConnectorAzureDevOpsOrgAvailable -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + +## EXAMPLES + +### Example 1: List available AzureDevOps organizations for onboarding +```powershell +Get-AzSecurityConnectorAzureDevOpsOrgAvailable -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:49:40 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsOrgListResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsProject.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsProject.md new file mode 100644 index 000000000000..3b153b143726 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsProject.md @@ -0,0 +1,219 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsproject +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorAzureDevOpsProject + +## SYNOPSIS +Returns a monitored Azure DevOps project resource. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorAzureDevOpsProject -OrgName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzSecurityConnectorAzureDevOpsProject -OrgName -ProjectName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorAzureDevOpsProject -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored Azure DevOps project resource. + +## EXAMPLES + +### Example 1: Get discovered AzureDevOps project by organization and project name +```powershell +Get-AzSecurityConnectorAzureDevOpsProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests -ProjectName ContosoSDKDfd +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/Co + ntosoSDKDfd +Name : ContosoSDKDfd +OnboardingState : Onboarded +ParentOrgName : dfdsdktests +ProjectId : 161fb6f6-f2fe-4616-a627-293b788ff583 +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:52:43 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects +``` + + + +### Example 2: List discovered AzureDevOps projects +```powershell +Get-AzSecurityConnectorAzureDevOpsProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests +``` + +```output +Name ResourceGroupName +---- ----------------- +ContosoSDKDfd dfdtest-sdk +ContosoEnterprise dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OrgName +The Azure DevOps organization name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectName +The project name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsProject + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsRepo.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsRepo.md new file mode 100644 index 000000000000..ec676b859fd3 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorAzureDevOpsRepo.md @@ -0,0 +1,238 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorazuredevopsrepo +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorAzureDevOpsRepo + +## SYNOPSIS +Returns a monitored Azure DevOps repository resource. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorAzureDevOpsRepo -OrgName -ProjectName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzSecurityConnectorAzureDevOpsRepo -OrgName -ProjectName -RepoName + -ResourceGroupName -SecurityConnectorName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorAzureDevOpsRepo -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored Azure DevOps repository resource. + +## EXAMPLES + +### Example 1: Get discovered AzureDevOps repository by organization, project and repo name +```powershell +Get-AzSecurityConnectorAzureDevOpsRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests -ProjectName ContosoSDKDfd -RepoName TestApp0 +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Enabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/Co + ntosoSDKDfd/repos/TestApp0 +Name : TestApp0 +OnboardingState : Onboarded +ParentOrgName : dfdsdktests +ParentProjectName : ContosoSDKDfd +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:52:44 PM +RepoId : 35cd4811-63c7-4043-8587-f0a9cf37709e +RepoUrl : https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp0 +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos +Visibility : +``` + + + +### Example 2: List discovered AzureDevOps repositories +```powershell +Get-AzSecurityConnectorAzureDevOpsRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests -ProjectName ContosoSDKDfd +``` + +```output +Name ResourceGroupName +---- ----------------- +ContosoSDKDfd dfdtest-sdk +TestApp0 dfdtest-sdk +TestApp2 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OrgName +The Azure DevOps organization name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectName +The project name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepoName +The repository name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsRepository + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..331e6befd87a --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectordevopsconfiguration +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorDevOpsConfiguration + +## SYNOPSIS +Gets a DevOps Configuration. + +## SYNTAX + +### Get (Default) +``` +Get-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorDevOpsConfiguration -InputObject [-DefaultProfile ] + [] +``` + +### List +``` +Get-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets a DevOps Configuration. + +## EXAMPLES + +### Example 1: Get Security Connector DevOps Configuration +```powershell +Get-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 +``` + +```output +AuthorizationCode : +AutoDiscovery : Disabled +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default +Name : default +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource creation successful. +ProvisioningStatusUpdateTimeUtc : +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TopLevelInventoryList : +Type : Microsoft.Security/securityConnectors/devops +``` + + + +### Example 2: Try to get non existing Security Connector DevOps Configuration +```powershell +Get-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName securityconnectors-tests -SecurityConnectorName aws-sdktest01 +``` + +```output +Get-AzSecurityConnectorDevOpsConfiguration_Get: DevOps configuration was not found +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDevOpsConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubOwner.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubOwner.md new file mode 100644 index 000000000000..4c53ac1c2d30 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubOwner.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgithubowner +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitHubOwner + +## SYNOPSIS +Returns a monitored GitHub owner. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorGitHubOwner -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSecurityConnectorGitHubOwner -OwnerName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorGitHubOwner -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored GitHub owner. + +## EXAMPLES + +### Example 1: Get discovered GitHub owner by name +```powershell +Get-AzSecurityConnectorGitHubOwner -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 -OwnerName dfdsdktests +``` + +```output +GitHubInternalId : 45003365 +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +OwnerUrl : https://github.com/dfdsdktests +ProvisioningState : Pending +ProvisioningStatusMessage : Beginning provisioning of GitHub connector. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 8:46:22 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitHubOwners +``` + + + +### Example 2: List discovered GitHub owners +```powershell +Get-AzSecurityConnectorGitHubOwner -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests dfdtest-sdk +dfdsdktests2 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OwnerName +The GitHub owner name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitHubOwner + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubOwnerAvailable.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubOwnerAvailable.md new file mode 100644 index 000000000000..68d0893e9597 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubOwnerAvailable.md @@ -0,0 +1,158 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgithubowneravailable +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitHubOwnerAvailable + +## SYNOPSIS +Returns a list of all GitHub owners accessible by the user token consumed by the connector. + +## SYNTAX + +``` +Get-AzSecurityConnectorGitHubOwnerAvailable -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Returns a list of all GitHub owners accessible by the user token consumed by the connector. + +## EXAMPLES + +### Example 1: List available GitHub owners for onboarding +```powershell +Get-AzSecurityConnectorGitHubOwnerAvailable -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 +``` + +```output +GitHubInternalId : 45003365 +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +OwnerUrl : https://github.com/dfdsdktests +ProvisioningState : Pending +ProvisioningStatusMessage : Beginning provisioning of GitHub connector. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 8:46:22 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitHubOwners +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitHubOwnerListResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubRepo.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubRepo.md new file mode 100644 index 000000000000..121a36b4d619 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitHubRepo.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgithubrepo +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitHubRepo + +## SYNOPSIS +Returns a monitored GitHub repository. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorGitHubRepo -OwnerName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzSecurityConnectorGitHubRepo -OwnerName -RepoName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorGitHubRepo -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored GitHub repository. + +## EXAMPLES + +### Example 1: Get discovered GitHub repository by name +```powershell +Get-AzSecurityConnectorGitHubRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 -OwnerName dfdsdktests -RepoName TestApp0 +``` + +```output +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0 +Name : TestApp0 +OnboardingState : Onboarded +ParentOwnerName : dfdsdktests +ProvisioningState : +ProvisioningStatusMessage : +ProvisioningStatusUpdateTimeUtc : 2/23/2024 8:46:23 PM +RepoFullName : +RepoId : 728418798 +RepoName : TestApp0 +RepoUrl : https://github.com/dfdsdktests/TestApp0 +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitHubOwners/repos +``` + + + +### Example 2: List discovered GitHub repositories +```powershell +Get-AzSecurityConnectorGitHubRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 -OwnerName dfdsdktests +``` + +```output + +Name ResourceGroupName +---- ----------------- +TestApp0 dfdtest-sdk +TestApp1 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OwnerName +The GitHub owner name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepoName +The repository name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitHubRepository + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabGroup.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabGroup.md new file mode 100644 index 000000000000..c97e189b613c --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabGroup.md @@ -0,0 +1,189 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgitlabgroup +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitLabGroup + +## SYNOPSIS +Returns a monitored GitLab Group resource for a given fully-qualified name. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorGitLabGroup -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzSecurityConnectorGitLabGroup -GroupFqName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorGitLabGroup -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored GitLab Group resource for a given fully-qualified name. + +## EXAMPLES + +### Example 1: Get discovered GitLab group by name +```powershell +Get-AzSecurityConnectorGitLabGroup -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests +``` + +```output +FullyQualifiedFriendlyName : Defender for DevOps SDK Tests +FullyQualifiedName : dfdsdktests +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource modification successful. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 10:42:28 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitLabGroups +Url : https://gitlab.com/groups/dfdsdktests +``` + + + +### Example 2: List discovered GitLab groups +```powershell +Get-AzSecurityConnectorGitLabGroup -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests dfdtest-sdk +dfdsdktests2 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupFqName +The GitLab group fully-qualified name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitLabGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabGroupAvailable.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabGroupAvailable.md new file mode 100644 index 000000000000..45c67bd4e0cb --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabGroupAvailable.md @@ -0,0 +1,159 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgitlabgroupavailable +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitLabGroupAvailable + +## SYNOPSIS +Returns a list of all GitLab groups accessible by the user token consumed by the connector. + +## SYNTAX + +``` +Get-AzSecurityConnectorGitLabGroupAvailable -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Returns a list of all GitLab groups accessible by the user token consumed by the connector. + +## EXAMPLES + +### Example 1: List available GitLab groups for onboarding +```powershell +Get-AzSecurityConnectorGitLabGroupAvailable -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 +``` + +```output +FullyQualifiedFriendlyName : Defender for DevOps SDK Tests +FullyQualifiedName : dfdsdktests +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource modification successful. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 10:42:28 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitLabGroups +Url : https://gitlab.com/groups/dfdsdktests +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitLabGroupListResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabProject.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabProject.md new file mode 100644 index 000000000000..af312016ca2e --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabProject.md @@ -0,0 +1,207 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgitlabproject +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitLabProject + +## SYNOPSIS +Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + +## SYNTAX + +### List (Default) +``` +Get-AzSecurityConnectorGitLabProject -GroupFqName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzSecurityConnectorGitLabProject -GroupFqName -ProjectName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzSecurityConnectorGitLabProject -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + +## EXAMPLES + +### Example 1: Get discovered GitLab project by name +```powershell +Get-AzSecurityConnectorGitLabProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests -ProjectName testapp0 +``` + +```output +FullyQualifiedFriendlyName : Defender for DevOps SDK Tests / TestApp0 +FullyQualifiedName : dfdsdktests$testapp0 +FullyQualifiedParentGroupName : dfdsdktests +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0 +Name : testapp0 +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource modification successful. +ProvisioningStatusUpdateTimeUtc : 1/1/1970 12:00:00 AM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitLabGroups/projects +Url : https://gitlab.com/dfdsdktests/testapp0 +``` + + + +### Example 2: List discovered GitLab projects +```powershell +Get-AzSecurityConnectorGitLabProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests +``` + +```output +Name ResourceGroupName +---- ----------------- +testapp10 dfdtest-sdk +testapp11 dfdtest-sdk +testapp0 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupFqName +The GitLab group fully-qualified name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProjectName +The project name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitLabProject + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabSubgroup.md b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabSubgroup.md new file mode 100644 index 000000000000..301548ca7f13 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Get-AzSecurityConnectorGitLabSubgroup.md @@ -0,0 +1,162 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/get-azsecurityconnectorgitlabsubgroup +schema: 2.0.0 +--- + +# Get-AzSecurityConnectorGitLabSubgroup + +## SYNOPSIS +Gets nested subgroups of given GitLab Group which are onboarded to the connector. + +## SYNTAX + +``` +Get-AzSecurityConnectorGitLabSubgroup -GroupFqName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Gets nested subgroups of given GitLab Group which are onboarded to the connector. + +## EXAMPLES + +### Example 1: List discovered GitLab subgroups +```powershell +Get-AzSecurityConnectorGitLabSubgroup -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests$testsubgroup1$testsubgroupNested dfdtest-sdk +dfdsdktests$testsubgroup1 dfdtest-sdk +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupFqName +The GitLab group fully-qualified name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGitLabGroupListResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Invoke-AzSecurityApiCollectionApimOffboard.md b/src/Security/Security.Autorest/docs/Invoke-AzSecurityApiCollectionApimOffboard.md new file mode 100644 index 000000000000..de054ff09dc0 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Invoke-AzSecurityApiCollectionApimOffboard.md @@ -0,0 +1,198 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/invoke-azsecurityapicollectionapimoffboard +schema: 2.0.0 +--- + +# Invoke-AzSecurityApiCollectionApimOffboard + +## SYNOPSIS +Offboard an Azure API Management API from Microsoft Defender for APIs. +The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors. + +## SYNTAX + +### Delete (Default) +``` +Invoke-AzSecurityApiCollectionApimOffboard -ApiId -ResourceGroupName -ServiceName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Invoke-AzSecurityApiCollectionApimOffboard -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Offboard an Azure API Management API from Microsoft Defender for APIs. +The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors. + +## EXAMPLES + +### Example 1: Offboard an Azure API Management API to Microsoft Defender for APIs. +```powershell +Invoke-AzSecurityApiCollectionApimOffboard -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2" -ApiId "echo-api-2" +``` + + + +## PARAMETERS + +### -ApiId +API revision identifier. +Must be unique in the API Management service instance. +Non-current revision has ;rev=n as a suffix where n is the revision number. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceName +The name of the API Management service. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Invoke-AzSecurityApiCollectionApimOnboard.md b/src/Security/Security.Autorest/docs/Invoke-AzSecurityApiCollectionApimOnboard.md new file mode 100644 index 000000000000..63e4ca1bf42d --- /dev/null +++ b/src/Security/Security.Autorest/docs/Invoke-AzSecurityApiCollectionApimOnboard.md @@ -0,0 +1,232 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/invoke-azsecurityapicollectionapimonboard +schema: 2.0.0 +--- + +# Invoke-AzSecurityApiCollectionApimOnboard + +## SYNOPSIS +Onboard an Azure API Management API to Microsoft Defender for APIs. +The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. + +## SYNTAX + +### Azure (Default) +``` +Invoke-AzSecurityApiCollectionApimOnboard -ApiId -ResourceGroupName -ServiceName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### AzureViaIdentity +``` +Invoke-AzSecurityApiCollectionApimOnboard -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Onboard an Azure API Management API to Microsoft Defender for APIs. +The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. + +## EXAMPLES + +### Example 1: Onboard an Azure API Management API to Microsoft Defender for APIs. +```powershell +Invoke-AzSecurityApiCollectionApimOnboard -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2" -ApiId "echo-api-2" +``` + +```output +BaseUrl : https://demoapimservice2.azure-api.net +DiscoveredVia : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2 +DisplayName : Echo API 2 +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/ech + o-api-2 +Name : echo-api-2 +NumberOfApiEndpoint : 0 +NumberOfApiEndpointsWithSensitiveDataExposed : 0 +NumberOfExternalApiEndpoint : 0 +NumberOfInactiveApiEndpoint : 0 +NumberOfUnauthenticatedApiEndpoint : 0 +ProvisioningState : Succeeded +ResourceGroupName : apicollectionstests +SensitivityLabel : +Type : microsoft.security/apicollections +``` + + + +## PARAMETERS + +### -ApiId +API revision identifier. +Must be unique in the API Management service instance. +Non-current revision has ;rev=n as a suffix where n is the revision number. + +```yaml +Type: System.String +Parameter Sets: Azure +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: AzureViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Azure +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceName +The name of the API Management service. + +```yaml +Type: System.String +Parameter Sets: Azure +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: Azure +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IApiCollection + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityAwsEnvironmentObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityAwsEnvironmentObject.md new file mode 100644 index 000000000000..abb5a6a0e072 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityAwsEnvironmentObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecurityawsenvironmentobject +schema: 2.0.0 +--- + +# New-AzSecurityAwsEnvironmentObject + +## SYNOPSIS +Create an in-memory object for AwsEnvironment. + +## SYNTAX + +``` +New-AzSecurityAwsEnvironmentObject [-OrganizationalData ] [-Region ] + [-ScanInterval ] [] +``` + +## DESCRIPTION +Create an in-memory object for AwsEnvironment. + +## EXAMPLES + +### Example 1: Create new AwsEnvironment object as member +```powershell +$member = New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123" +New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $member +``` + +```output +AccountName : +EnvironmentType : AwsAccount +OrganizationalData : { + "organizationMembershipType": "Member", + "parentHierarchyId": "123" + } +Region : {Central US} +ScanInterval : 24 +``` + + + +### Example 2: Create new AwsEnvironment object as organization +```powershell +$organization = New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012" +New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $organization +``` + +```output +AccountName : +EnvironmentType : AwsAccount +OrganizationalData : { + "organizationMembershipType": "Organization", + "stacksetName": "myAwsStackSet", + "excludedAccountIds": [ "123456789012" ] + } +Region : {Central US} +ScanInterval : 24 +``` + + + +## PARAMETERS + +### -OrganizationalData +The AWS account's organizational data. +To construct, see NOTES section for ORGANIZATIONALDATA properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAwsOrganizationalData +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Region +list of regions to scan. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanInterval +Scan interval in hours (value should be between 1-hour to 24-hours). + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.AwsEnvironment + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityAwsOrganizationalDataMasterObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityAwsOrganizationalDataMasterObject.md new file mode 100644 index 000000000000..2b81beb6a626 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityAwsOrganizationalDataMasterObject.md @@ -0,0 +1,82 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecurityawsorganizationaldatamasterobject +schema: 2.0.0 +--- + +# New-AzSecurityAwsOrganizationalDataMasterObject + +## SYNOPSIS +Create an in-memory object for AwsOrganizationalDataMaster. + +## SYNTAX + +``` +New-AzSecurityAwsOrganizationalDataMasterObject [-ExcludedAccountId ] [-StacksetName ] + [] +``` + +## DESCRIPTION +Create an in-memory object for AwsOrganizationalDataMaster. + +## EXAMPLES + +### Example 1: Create new AwsOrganizationalDataMaster object +```powershell +New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012" +``` + +```output +ExcludedAccountId OrganizationMembershipType StacksetName +----------------- -------------------------- ------------ +{123456789012} Organization myAwsStackSet +``` + + + +## PARAMETERS + +### -ExcludedAccountId +If the multi cloud account is of membership type organization, list of accounts excluded from offering. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StacksetName +If the multi cloud account is of membership type organization, this will be the name of the onboarding stackset. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.AwsOrganizationalDataMaster + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityAwsOrganizationalDataMemberObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityAwsOrganizationalDataMemberObject.md new file mode 100644 index 000000000000..a19129698d20 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityAwsOrganizationalDataMemberObject.md @@ -0,0 +1,66 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecurityawsorganizationaldatamemberobject +schema: 2.0.0 +--- + +# New-AzSecurityAwsOrganizationalDataMemberObject + +## SYNOPSIS +Create an in-memory object for AwsOrganizationalDataMember. + +## SYNTAX + +``` +New-AzSecurityAwsOrganizationalDataMemberObject [-ParentHierarchyId ] [] +``` + +## DESCRIPTION +Create an in-memory object for AwsOrganizationalDataMember. + +## EXAMPLES + +### Example 1: Create new AwsOrganizationalDataMember object +```powershell +New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123" +``` + +```output +OrganizationMembershipType ParentHierarchyId +-------------------------- ----------------- +Member 123 +``` + + + +## PARAMETERS + +### -ParentHierarchyId +If the multi cloud account is not of membership type organization, this will be the ID of the account's parent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.AwsOrganizationalDataMember + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityAzureDevOpsScopeEnvironmentObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityAzureDevOpsScopeEnvironmentObject.md new file mode 100644 index 000000000000..09ce09624915 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityAzureDevOpsScopeEnvironmentObject.md @@ -0,0 +1,51 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecurityazuredevopsscopeenvironmentobject +schema: 2.0.0 +--- + +# New-AzSecurityAzureDevOpsScopeEnvironmentObject + +## SYNOPSIS +Create an in-memory object for AzureDevOpsScopeEnvironment. + +## SYNTAX + +``` +New-AzSecurityAzureDevOpsScopeEnvironmentObject [] +``` + +## DESCRIPTION +Create an in-memory object for AzureDevOpsScopeEnvironment. + +## EXAMPLES + +### Example 1: Create new AzureDevOpsScopeEnvironment object +```powershell +New-AzSecurityAzureDevOpsScopeEnvironmentObject +``` + +```output +EnvironmentType +--------------- +AzureDevOpsScope +``` + + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.AzureDevOpsScopeEnvironment + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityConnector.md b/src/Security/Security.Autorest/docs/New-AzSecurityConnector.md new file mode 100644 index 000000000000..e3bc6ded8494 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityConnector.md @@ -0,0 +1,612 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/new-azsecurityconnector +schema: 2.0.0 +--- + +# New-AzSecurityConnector + +## SYNOPSIS +Create a security connector. +If a security connector is already created and a subsequent request is issued for the same security connector id, then it will be updated. + +## SYNTAX + +``` +New-AzSecurityConnector -Name -ResourceGroupName [-SubscriptionId ] + [-EnvironmentData ] [-EnvironmentName ] [-Etag ] + [-HierarchyIdentifier ] [-Kind ] [-Location ] [-Offering ] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a security connector. +If a security connector is already created and a subsequent request is issued for the same security connector id, then it will be updated. + +## EXAMPLES + +### Example 1: Create AWS security connector +```powershell +$account = "891376984375" +$arnPrefix = "arn:aws:iam::$($account):role" + +$cspmMonitorOffering = New-AzSecurityCspmMonitorAwsOfferingObject -NativeCloudConnectionCloudRoleArn "$arnPrefix/CspmMonitorAws" + +$dcspmOffering = New-AzSecurityDefenderCspmAwsOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryCloudRoleArn "$arnPrefix/SensitiveDataDiscovery" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" ` + -CiemDiscoveryCloudRoleArn "$arnPrefix/DefenderForCloud-Ciem" -CiemOidcAzureActiveDirectoryAppName "mciem-aws-oidc-connector" -CiemOidcCloudRoleArn "$arnPrefix/DefenderForCloud-OidcCiem" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" + +$defenderForContainersOffering = New-AzSecurityDefenderForContainersAwsOfferingObject ` + -AutoProvisioning $true -KuberneteServiceCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s" -KuberneteScubaReaderCloudRoleArn "$arnPrefix/DefenderForCloud-DataCollection" ` + -KinesiToS3CloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-kinesis-to-s3" -CloudWatchToKinesiCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" ` + -KubeAuditRetentionTime 30 -ScubaExternalId "a47ae0a2-7bf7-482a-897a-7a139d30736c" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -EnableContainerVulnerabilityAssessment $false + +$environment = New-AzSecurityAwsEnvironmentObject -ScanInterval 24 + +New-AzSecurityConnector -Name "aws-sdktest01" -ResourceGroupName "securityConnectors-tests" ` + -EnvironmentData $environment -EnvironmentName AWS -HierarchyIdentifier "$account" ` + -Offering @($cspmMonitorOffering, $dcspmOffering, $defenderForContainersOffering) ` + -Location "CentralUS" +``` + +```output +EnvironmentData : { + "environmentType": "AwsAccount", + "regions": [ ], + "scanInterval": 24 + } +EnvironmentName : AWS +Etag : +HierarchyIdentifier : 891376984375 +HierarchyIdentifierTrialEndDate : 3/24/2024 12:00:00 AM +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-tests/providers/Microsoft.Security/securityConnectors/aws-sdktes + t01 +Kind : +Location : CentralUS +Name : aws-sdktest01 +Offering : {{ + "offeringType": "CspmMonitorAws", + "nativeCloudConnection": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/CspmMonitorAws" + } + }, { + "offeringType": "DefenderCspmAws", + "vmScanners": { + "configuration": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-AgentlessScanner", + "scanningMode": "Default" + }, + "enabled": true + }, + "dataSensitivityDiscovery": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/SensitiveDataDiscovery" + }, + "databasesDspm": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-DataSecurityPostureDB" + }, + "ciem": { + "ciemDiscovery": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Ciem" + }, + "ciemOidc": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-OidcCiem", + "azureActiveDirectoryAppName": "mciem-aws-oidc-connector" + } + }, + "mdcContainersImageAssessment": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersImageAssessmentRole" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersAgentlessDiscoveryK8sRole" + } + }, { + "offeringType": "DefenderForContainersAws", + "kubernetesService": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s" + }, + "kubernetesScubaReader": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-DataCollection" + }, + "cloudWatchToKinesis": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" + }, + "kinesisToS3": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s-kinesis-to-s3" + }, + "mdcContainersImageAssessment": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersImageAssessmentRole" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersAgentlessDiscoveryK8sRole" + }, + "enableContainerVulnerabilityAssessment": false, + "autoProvisioning": true, + "kubeAuditRetentionTime": 30, + "scubaExternalId": "a47ae0a2-7bf7-482a-897a-7a139d30736c" + }} +ResourceGroupName : securityconnectors-tests +SystemDataCreatedAt : 2/22/2024 11:45:53 PM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/22/2024 11:45:53 PM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + + + +### Example 2: Create GCP security connector +```powershell +$account = "843025268399" +$emailSuffix = "myproject.iam.gserviceaccount.com" +$cspmMonitorOffering = New-AzSecurityCspmMonitorGcpOfferingObject -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-cspm@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "cspm" + +$dcspmOffering = New-AzSecurityDefenderCspmGcpOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationExclusionTag @{key="value"} ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryServiceAccountEmailAddress "mdc-data-sec-posture-storage@$emailSuffix" -DataSensitivityDiscoveryWorkloadIdentityProviderId "data-security-posture-storage" ` + -CiemDiscoveryServiceAccountEmailAddress "microsoft-defender-ciem@$emailSuffix" -CiemDiscoveryAzureActiveDirectoryAppName "mciem-gcp-oidc-app" -CiemDiscoveryWorkloadIdentityProviderId "ciem-discovery" + +$defenderForContainersOffering = New-AzSecurityDefenderForContainersGcpOfferingObject ` + -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-containers@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "containers" ` + -DataPipelineNativeCloudConnectionServiceAccountEmailAddress "ms-defender-containers-stream@$emailSuffix" -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId "containers-streams" ` + -AuditLogsAutoProvisioningFlag $true -DefenderAgentAutoProvisioningFlag $true -PolicyAgentAutoProvisioningFlag $true ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" + +$environment = New-AzSecurityGcpProjectEnvironmentObject -ScanInterval 24 -ProjectDetailProjectId "asc-sdk-samples" -ProjectDetailProjectNumber "$account" + +New-AzSecurityConnector -Name "gcp-sdktest01" -ResourceGroupName "securityConnectors-tests" -EnvironmentData $environment -EnvironmentName GCP -HierarchyIdentifier "$account" ` + -Offering @($cspmMonitorOffering, $dcspmOffering, $defenderForContainersOffering) -Location "CentralUS" +``` + +```output +EnvironmentData : { + "environmentType": "GcpProject", + "projectDetails": { + "projectNumber": "843025268399", + "projectId": "asc-sdk-samples" + }, + "scanInterval": 24 + } +EnvironmentName : GCP +Etag : +HierarchyIdentifier : 843025268399 +HierarchyIdentifierTrialEndDate : 3/24/2024 12:00:00 AM +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-tests/providers/Microsoft.Security/securityConnectors/gcp-sdktest01 +Kind : +Location : CentralUS +Name : gcp-sdktest01 +Offering : {{ + "offeringType": "CspmMonitorGcp", + "nativeCloudConnection": { + "workloadIdentityProviderId": "cspm", + "serviceAccountEmailAddress": "microsoft-defender-cspm@myproject.iam.gserviceaccount.com" + } + }, { + "offeringType": "DefenderCspmGcp", + "ciemDiscovery": { + "workloadIdentityProviderId": "ciem-discovery", + "serviceAccountEmailAddress": "microsoft-defender-ciem@myproject.iam.gserviceaccount.com", + "azureActiveDirectoryAppName": "mciem-gcp-oidc-app" + }, + "vmScanners": { + "configuration": { + "scanningMode": "Default", + "exclusionTags": { + "key": "value" + } + }, + "enabled": true + }, + "dataSensitivityDiscovery": { + "enabled": true, + "workloadIdentityProviderId": "data-security-posture-storage", + "serviceAccountEmailAddress": "mdc-data-sec-posture-storage@myproject.iam.gserviceaccount.com" + }, + "mdcContainersImageAssessment": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com" + } + }, { + "offeringType": "DefenderForContainersGcp", + "nativeCloudConnection": { + "serviceAccountEmailAddress": "microsoft-defender-containers@myproject.iam.gserviceaccount.com", + "workloadIdentityProviderId": "containers" + }, + "dataPipelineNativeCloudConnection": { + "serviceAccountEmailAddress": "ms-defender-containers-stream@myproject.iam.gserviceaccount.com", + "workloadIdentityProviderId": "containers-streams" + }, + "mdcContainersImageAssessment": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com" + }, + "auditLogsAutoProvisioningFlag": true, + "defenderAgentAutoProvisioningFlag": true, + "policyAgentAutoProvisioningFlag": true + }} +ResourceGroupName : securityconnectors-tests +SystemDataCreatedAt : 2/22/2024 11:45:53 PM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/22/2024 11:45:53 PM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : {} +Type : Microsoft.Security/securityconnectors +``` + + + +### Example 3: Create AzureDevOps security connector +```powershell +New-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "ado-sdk-pwsh-test03" ` + -EnvironmentName AzureDevOps -EnvironmentData (New-AzSecurityAzureDevOpsScopeEnvironmentObject) ` + -HierarchyIdentifier ([guid]::NewGuid().ToString()) -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorAzureDevOpsOfferingObject) +``` + +```output +EnvironmentData : { + "environmentType": "AzureDevOpsScope" + } +EnvironmentName : AzureDevOps +Etag : +HierarchyIdentifier : 9dd01e19-8aaf-43a2-8dd4-1c5992f4df35 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : ado-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorAzureDevOps" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:13:11 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:13:11 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + + + +### Example 4: Create GitHub security connector +```powershell +New-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "gh-sdk-pwsh-test03" ` + -EnvironmentName GitHub -EnvironmentData (New-AzSecurityGitHubScopeEnvironmentObject) ` + -HierarchyIdentifier ([guid]::NewGuid().ToString()) -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorGithubOfferingObject) +``` + +```output +EnvironmentData : { + "environmentType": "GithubScope" + } +EnvironmentName : Github +Etag : +HierarchyIdentifier : e8661d05-8003-46ae-b687-fa83746f44f3 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : gh-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorGithub" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:55:33 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:55:33 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + + + +### Example 5: Create GitLab security connector +```powershell +New-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "gl-sdk-pwsh-test03" ` + -EnvironmentName GitLab -EnvironmentData (New-AzSecurityGitLabScopeEnvironmentObject) ` + -HierarchyIdentifier ([guid]::NewGuid().ToString()) -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorGitLabOfferingObject) +``` + +```output +EnvironmentData : { + "environmentType": "GitLabScope" + } +EnvironmentName : GitLab +Etag : +HierarchyIdentifier : e8661d05-8003-46ae-b687-fa83746f44f3 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : gl-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorGitLab" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:55:33 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:55:33 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentData +The security connector environment data. +To construct, see NOTES section for ENVIRONMENTDATA properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityConnectorEnvironment +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentName +The multi cloud resource's cloud name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Etag +Entity tag is used for comparing two or more entities from the same requested resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HierarchyIdentifier +The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Kind +Kind of the resource + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Location where the resource is stored + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The security connector name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SecurityConnectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Offering +A collection of offerings for the security connector. +To construct, see NOTES section for OFFERING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ICloudOffering[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group within the user's subscription. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +A list of key value pairs that describe the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityConnector + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityConnectorActionableRemediationObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityConnectorActionableRemediationObject.md new file mode 100644 index 000000000000..3b34cd2b8939 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityConnectorActionableRemediationObject.md @@ -0,0 +1,132 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecurityconnectoractionableremediationobject +schema: 2.0.0 +--- + +# New-AzSecurityConnectorActionableRemediationObject + +## SYNOPSIS +Create an in-memory object for ActionableRemediation. + +## SYNTAX + +``` +New-AzSecurityConnectorActionableRemediationObject [-BranchConfiguration ] + [-CategoryConfiguration ] [-InheritFromParentState ] [-State ] + [] +``` + +## DESCRIPTION +Create an in-memory object for ActionableRemediation. + +## EXAMPLES + +### Example 1: Create new ActionableRemediation object +```powershell +New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled ` + -BranchConfiguration @{AnnotateDefaultBranch="Enabled"; branchName=@("main", "hotfix")} -CategoryConfiguration @( @{category="First"; minimumSeverityLevel="High"}, @{category="Second"; minimumSeverityLevel="Low"}) +``` + +```output +BranchConfiguration : { + "branchNames": [ "main", "hotfix" ], + "annotateDefaultBranch": "Enabled" + } +CategoryConfiguration : {{ + "minimumSeverityLevel": "High", + "category": "First" + }, { + "minimumSeverityLevel": "Low", + "category": "Second" + }} +InheritFromParentState : Disabled +State : Enabled +``` + + + +## PARAMETERS + +### -BranchConfiguration +Repository branch configuration for PR Annotations. +To construct, see NOTES section for BRANCHCONFIGURATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ITargetBranchConfiguration +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CategoryConfiguration +Gets or sets list of categories and severity levels. +To construct, see NOTES section for CATEGORYCONFIGURATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ICategoryConfiguration[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InheritFromParentState +Update Settings. + + Enabled - Resource should inherit configurations from parent. + Disabled - Resource should not inherit configurations from parent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State +ActionableRemediation Setting. + None - the setting was never set. + Enabled - ActionableRemediation is enabled. + Disabled - ActionableRemediation is disabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ActionableRemediation + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/docs/New-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..334a4acfb5bc --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,236 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/new-azsecurityconnectordevopsconfiguration +schema: 2.0.0 +--- + +# New-AzSecurityConnectorDevOpsConfiguration + +## SYNOPSIS +Create a DevOps Configuration. + +## SYNTAX + +``` +New-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-AuthorizationCode ] [-AutoDiscovery ] + [-TopLevelInventoryList ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a DevOps Configuration. + +## EXAMPLES + +### Example 1: Create new DevOps Configuration for the security connector +```powershell +New-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName "securityconnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -AutoDiscovery Disabled -TopLevelInventoryList @("org1", "org2") -AuthorizationCode "myAuthorizationCode" +``` + +```output +AuthorizationCode : +AutoDiscovery : Disabled +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default +Name : default +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource creation successful. +ProvisioningStatusUpdateTimeUtc : +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TopLevelInventoryList : +Type : Microsoft.Security/securityConnectors/devops +``` + + + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AuthorizationCode +Gets or sets one-time OAuth code to exchange for refresh and access tokens.Only used during PUT/PATCH operations. +The secret is cleared during GET. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutoDiscovery +AutoDiscovery states. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TopLevelInventoryList +List of top-level inventory to select when AutoDiscovery is disabled.This field is ignored when AutoDiscovery is enabled. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDevOpsConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorAwsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorAwsOfferingObject.md new file mode 100644 index 000000000000..5445f328cb32 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorAwsOfferingObject.md @@ -0,0 +1,66 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritycspmmonitorawsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityCspmMonitorAwsOfferingObject + +## SYNOPSIS +Create an in-memory object for CspmMonitorAwsOffering. + +## SYNTAX + +``` +New-AzSecurityCspmMonitorAwsOfferingObject [-NativeCloudConnectionCloudRoleArn ] [] +``` + +## DESCRIPTION +Create an in-memory object for CspmMonitorAwsOffering. + +## EXAMPLES + +### Example 1: Create new CspmMonitorAwsOffering object +```powershell +New-AzSecurityCspmMonitorAwsOfferingObject -NativeCloudConnectionCloudRoleArn "arn:aws:iam::123456789012:role/CspmMonitorAws" +``` + +```output +Description NativeCloudConnectionCloudRoleArn OfferingType +----------- --------------------------------- ------------ + arn:aws:iam::123456789012:role/CspmMonitorAws CspmMonitorAws +``` + + + +## PARAMETERS + +### -NativeCloudConnectionCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.CspmMonitorAwsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md new file mode 100644 index 000000000000..322ff17055a2 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md @@ -0,0 +1,51 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritycspmmonitorazuredevopsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityCspmMonitorAzureDevOpsOfferingObject + +## SYNOPSIS +Create an in-memory object for CspmMonitorAzureDevOpsOffering. + +## SYNTAX + +``` +New-AzSecurityCspmMonitorAzureDevOpsOfferingObject [] +``` + +## DESCRIPTION +Create an in-memory object for CspmMonitorAzureDevOpsOffering. + +## EXAMPLES + +### Example 1: Create new CspmMonitorAzureDevOpsOffering object +```powershell +New-AzSecurityCspmMonitorAzureDevOpsOfferingObject +``` + +```output +Description OfferingType +----------- ------------ + CspmMonitorAzureDevOps +``` + + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.CspmMonitorAzureDevOpsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGcpOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGcpOfferingObject.md new file mode 100644 index 000000000000..b517486a45af --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGcpOfferingObject.md @@ -0,0 +1,82 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritycspmmonitorgcpofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityCspmMonitorGcpOfferingObject + +## SYNOPSIS +Create an in-memory object for CspmMonitorGcpOffering. + +## SYNTAX + +``` +New-AzSecurityCspmMonitorGcpOfferingObject [-NativeCloudConnectionServiceAccountEmailAddress ] + [-NativeCloudConnectionWorkloadIdentityProviderId ] [] +``` + +## DESCRIPTION +Create an in-memory object for CspmMonitorGcpOffering. + +## EXAMPLES + +### Example 1: Create new CspmMonitorGcpOffering object +```powershell +New-AzSecurityCspmMonitorGcpOfferingObject -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-cspm@asc-sdk-samples.iam.gserviceaccount.com" -NativeCloudConnectionWorkloadIdentityProviderId "cspm" +``` + +```output +Description NativeCloudConnectionServiceAccountEmailAddress NativeCloudConnectionWorkloadIdentityProviderId OfferingType +----------- ----------------------------------------------- ----------------------------------------------- ------------ + microsoft-defender-cspm@asc-sdk-samples.iam.gserviceaccount.com cspm CspmMonitorGcp +``` + + + +## PARAMETERS + +### -NativeCloudConnectionServiceAccountEmailAddress +The service account email address in GCP for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NativeCloudConnectionWorkloadIdentityProviderId +The GCP workload identity provider id for the offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.CspmMonitorGcpOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGitLabOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGitLabOfferingObject.md new file mode 100644 index 000000000000..a733d02a4530 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGitLabOfferingObject.md @@ -0,0 +1,51 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritycspmmonitorgitlabofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityCspmMonitorGitLabOfferingObject + +## SYNOPSIS +Create an in-memory object for CspmMonitorGitLabOffering. + +## SYNTAX + +``` +New-AzSecurityCspmMonitorGitLabOfferingObject [] +``` + +## DESCRIPTION +Create an in-memory object for CspmMonitorGitLabOffering. + +## EXAMPLES + +### Example 1: Create new CspmMonitorGitLabOffering object +```powershell +New-AzSecurityCspmMonitorGitLabOfferingObject +``` + +```output +Description OfferingType +----------- ------------ + CspmMonitorGitLab +``` + + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.CspmMonitorGitLabOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGithubOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGithubOfferingObject.md new file mode 100644 index 000000000000..c1c01a8b24e0 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityCspmMonitorGithubOfferingObject.md @@ -0,0 +1,51 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritycspmmonitorgithubofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityCspmMonitorGithubOfferingObject + +## SYNOPSIS +Create an in-memory object for CspmMonitorGithubOffering. + +## SYNTAX + +``` +New-AzSecurityCspmMonitorGithubOfferingObject [] +``` + +## DESCRIPTION +Create an in-memory object for CspmMonitorGithubOffering. + +## EXAMPLES + +### Example 1: Create new CspmMonitorGithubOffering object +```powershell +New-AzSecurityCspmMonitorGithubOfferingObject +``` + +```output +Description OfferingType +----------- ------------ + CspmMonitorGithub +``` + + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.CspmMonitorGithubOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderCspmAwsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderCspmAwsOfferingObject.md new file mode 100644 index 000000000000..481cd0b80c62 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderCspmAwsOfferingObject.md @@ -0,0 +1,308 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefendercspmawsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderCspmAwsOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderCspmAwsOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderCspmAwsOfferingObject [-CiemDiscoveryCloudRoleArn ] + [-CiemOidcAzureActiveDirectoryAppName ] [-CiemOidcCloudRoleArn ] + [-ConfigurationCloudRoleArn ] + [-ConfigurationExclusionTag ] + [-ConfigurationScanningMode ] [-DatabaseDspmCloudRoleArn ] [-DatabaseDspmEnabled ] + [-DataSensitivityDiscoveryCloudRoleArn ] [-DataSensitivityDiscoveryEnabled ] + [-MdcContainerAgentlessDiscoveryK8SCloudRoleArn ] + [-MdcContainerAgentlessDiscoveryK8SEnabled ] [-MdcContainerImageAssessmentCloudRoleArn ] + [-MdcContainerImageAssessmentEnabled ] [-VMScannerEnabled ] [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderCspmAwsOffering. + +## EXAMPLES + +### Example 1: Create new DefenderCspmAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderCspmAwsOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationExclusionTag @{key="value"} ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryCloudRoleArn "$arnPrefix/SensitiveDataDiscovery" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" ` + -CiemDiscoveryCloudRoleArn "$arnPrefix/DefenderForCloud-Ciem" -CiemOidcAzureActiveDirectoryAppName "mciem-aws-oidc-connector" -CiemOidcCloudRoleArn "$arnPrefix/DefenderForCloud-OidcCiem" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" +``` + +```output +CiemDiscoveryCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Ciem +CiemOidcAzureActiveDirectoryAppName : mciem-aws-oidc-connector +CiemOidcCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-OidcCiem +ConfigurationCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-AgentlessScanner +ConfigurationExclusionTag : { + "key": "value" + } +ConfigurationScanningMode : Default +DataSensitivityDiscoveryCloudRoleArn : arn:aws:iam::123456789012:role/SensitiveDataDiscovery +DataSensitivityDiscoveryEnabled : True +DatabaseDspmCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DataSecurityPostureDB +DatabaseDspmEnabled : True +Description : +MdcContainerAgentlessDiscoveryK8SCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersAgentlessDiscoveryK8sRole +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerImageAssessmentCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersImageAssessmentRole +MdcContainerImageAssessmentEnabled : True +OfferingType : DefenderCspmAws +VMScannerEnabled : True +``` + + + +## PARAMETERS + +### -CiemDiscoveryCloudRoleArn +The cloud role ARN in AWS for CIEM discovery. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CiemOidcAzureActiveDirectoryAppName +the azure active directory app name used of authenticating against AWS. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CiemOidcCloudRoleArn +The cloud role ARN in AWS for CIEM oidc connection. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationExclusionTag +VM tags that indicates that VM should not be scanned. +To construct, see NOTES section for CONFIGURATIONEXCLUSIONTAG properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDefenderCspmAwsOfferingVMScannersConfigurationExclusionTags +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationScanningMode +The scanning mode for the VM scan. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseDspmCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseDspmEnabled +Is databases DSPM protection enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSensitivityDiscoveryCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSensitivityDiscoveryEnabled +Is Microsoft Defender Data Sensitivity discovery enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SEnabled +Is Microsoft Defender container agentless discovery K8s enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentEnabled +Is Microsoft Defender container image assessment enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMScannerEnabled +Is Microsoft Defender for Server VM scanning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderCspmAwsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderCspmGcpOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderCspmGcpOfferingObject.md new file mode 100644 index 000000000000..e66105e8285e --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderCspmGcpOfferingObject.md @@ -0,0 +1,311 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefendercspmgcpofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderCspmGcpOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderCspmGcpOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderCspmGcpOfferingObject [-CiemDiscoveryAzureActiveDirectoryAppName ] + [-CiemDiscoveryServiceAccountEmailAddress ] [-CiemDiscoveryWorkloadIdentityProviderId ] + [-ConfigurationExclusionTag ] + [-ConfigurationScanningMode ] [-DataSensitivityDiscoveryEnabled ] + [-DataSensitivityDiscoveryServiceAccountEmailAddress ] + [-DataSensitivityDiscoveryWorkloadIdentityProviderId ] + [-MdcContainerAgentlessDiscoveryK8SEnabled ] + [-MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress ] + [-MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId ] + [-MdcContainerImageAssessmentEnabled ] + [-MdcContainerImageAssessmentServiceAccountEmailAddress ] + [-MdcContainerImageAssessmentWorkloadIdentityProviderId ] [-VMScannerEnabled ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderCspmGcpOffering. + +## EXAMPLES + +### Example 1: Create new DefenderCspmGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderCspmGcpOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationExclusionTag @{key="value"} ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryServiceAccountEmailAddress "mdc-data-sec-posture-storage@$emailSuffix" -DataSensitivityDiscoveryWorkloadIdentityProviderId "data-security-posture-storage" ` + -CiemDiscoveryServiceAccountEmailAddress "microsoft-defender-ciem@$emailSuffix" -CiemDiscoveryAzureActiveDirectoryAppName "mciem-gcp-oidc-app" -CiemDiscoveryWorkloadIdentityProviderId "ciem-discovery" +``` + +```output +CiemDiscoveryAzureActiveDirectoryAppName : mciem-gcp-oidc-app +CiemDiscoveryServiceAccountEmailAddress : microsoft-defender-ciem@myproject.iam.gserviceaccount.com +CiemDiscoveryWorkloadIdentityProviderId : ciem-discovery +ConfigurationExclusionTag : { + "key": "value" + } +ConfigurationScanningMode : Default +DataSensitivityDiscoveryEnabled : True +DataSensitivityDiscoveryServiceAccountEmailAddress : mdc-data-sec-posture-storage@myproject.iam.gserviceaccount.com +DataSensitivityDiscoveryWorkloadIdentityProviderId : data-security-posture-storage +Description : +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress : mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com +MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId : containers +MdcContainerImageAssessmentEnabled : True +MdcContainerImageAssessmentServiceAccountEmailAddress : mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com +MdcContainerImageAssessmentWorkloadIdentityProviderId : containers +OfferingType : DefenderCspmGcp +VMScannerEnabled : True +``` + + + +## PARAMETERS + +### -CiemDiscoveryAzureActiveDirectoryAppName +the azure active directory app name used of authenticating against GCP workload identity federation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CiemDiscoveryServiceAccountEmailAddress +The service account email address in GCP for CIEM discovery offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CiemDiscoveryWorkloadIdentityProviderId +The GCP workload identity provider id for CIEM discovery offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationExclusionTag +VM tags that indicates that VM should not be scanned. +To construct, see NOTES section for CONFIGURATIONEXCLUSIONTAG properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDefenderCspmGcpOfferingVMScannersConfigurationExclusionTags +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationScanningMode +The scanning mode for the VM scan. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSensitivityDiscoveryEnabled +Is Microsoft Defender Data Sensitivity discovery enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSensitivityDiscoveryServiceAccountEmailAddress +The service account email address in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSensitivityDiscoveryWorkloadIdentityProviderId +The workload identity provider id in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SEnabled +Is Microsoft Defender container agentless discovery enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress +The service account email address in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId +The workload identity provider id in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentEnabled +Is Microsoft Defender container image assessment enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentServiceAccountEmailAddress +The service account email address in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentWorkloadIdentityProviderId +The workload identity provider id in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMScannerEnabled +Is Microsoft Defender for Server VM scanning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderCspmGcpOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForContainersAwsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForContainersAwsOfferingObject.md new file mode 100644 index 000000000000..62f449d96e53 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForContainersAwsOfferingObject.md @@ -0,0 +1,288 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefenderforcontainersawsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderForContainersAwsOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderForContainersAwsOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderForContainersAwsOfferingObject [-AutoProvisioning ] + [-CloudWatchToKinesiCloudRoleArn ] [-ContainerVulnerabilityAssessmentCloudRoleArn ] + [-ContainerVulnerabilityAssessmentTaskCloudRoleArn ] + [-EnableContainerVulnerabilityAssessment ] [-KinesiToS3CloudRoleArn ] + [-KubeAuditRetentionTime ] [-KuberneteScubaReaderCloudRoleArn ] + [-KuberneteServiceCloudRoleArn ] [-MdcContainerAgentlessDiscoveryK8SCloudRoleArn ] + [-MdcContainerAgentlessDiscoveryK8SEnabled ] [-MdcContainerImageAssessmentCloudRoleArn ] + [-MdcContainerImageAssessmentEnabled ] [-ScubaExternalId ] [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderForContainersAwsOffering. + +## EXAMPLES + +### Example 1: Create new DefenderForContainersAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderForContainersAwsOfferingObject ` + -AutoProvisioning $true -KuberneteServiceCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s" -KuberneteScubaReaderCloudRoleArn "$arnPrefix/DefenderForCloud-DataCollection" ` + -KinesiToS3CloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-kinesis-to-s3" -CloudWatchToKinesiCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" ` + -KubeAuditRetentionTime 30 -ScubaExternalId "a47ae0a2-7bf7-482a-897a-7a139d30736c" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -EnableContainerVulnerabilityAssessment $false +``` + +```output +AutoProvisioning : True +CloudWatchToKinesiCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis +ContainerVulnerabilityAssessmentCloudRoleArn : +ContainerVulnerabilityAssessmentTaskCloudRoleArn : +Description : +EnableContainerVulnerabilityAssessment : False +KinesiToS3CloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Containers-K8s-kinesis-to-s3 +KubeAuditRetentionTime : 30 +KuberneteScubaReaderCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DataCollection +KuberneteServiceCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Containers-K8s +MdcContainerAgentlessDiscoveryK8SCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersAgentlessDiscoveryK8sRole +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerImageAssessmentCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersImageAssessmentRole +MdcContainerImageAssessmentEnabled : True +OfferingType : DefenderForContainersAws +ScubaExternalId : a47ae0a2-7bf7-482a-897a-7a139d30736c +``` + + + +## PARAMETERS + +### -AutoProvisioning +Is audit logs pipeline auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudWatchToKinesiCloudRoleArn +The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContainerVulnerabilityAssessmentCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContainerVulnerabilityAssessmentTaskCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableContainerVulnerabilityAssessment +Enable container vulnerability assessment feature. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KinesiToS3CloudRoleArn +The cloud role ARN in AWS used by Kinesis to transfer data into S3. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KubeAuditRetentionTime +The retention time in days of kube audit logs set on the CloudWatch log group. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KuberneteScubaReaderCloudRoleArn +The cloud role ARN in AWS for this feature used for reading data. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KuberneteServiceCloudRoleArn +The cloud role ARN in AWS for this feature used for provisioning resources. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SEnabled +Is Microsoft Defender container agentless discovery K8s enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentEnabled +Is Microsoft Defender container image assessment enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScubaExternalId +The externalId used by the data reader to prevent the confused deputy attack. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderForContainersAwsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForContainersGcpOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForContainersGcpOfferingObject.md new file mode 100644 index 000000000000..fe242dc06889 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForContainersGcpOfferingObject.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefenderforcontainersgcpofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderForContainersGcpOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderForContainersGcpOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderForContainersGcpOfferingObject [-AuditLogsAutoProvisioningFlag ] + [-DataPipelineNativeCloudConnectionServiceAccountEmailAddress ] + [-DataPipelineNativeCloudConnectionWorkloadIdentityProviderId ] + [-DefenderAgentAutoProvisioningFlag ] [-MdcContainerAgentlessDiscoveryK8SEnabled ] + [-MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress ] + [-MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId ] + [-MdcContainerImageAssessmentEnabled ] + [-MdcContainerImageAssessmentServiceAccountEmailAddress ] + [-MdcContainerImageAssessmentWorkloadIdentityProviderId ] + [-NativeCloudConnectionServiceAccountEmailAddress ] + [-NativeCloudConnectionWorkloadIdentityProviderId ] [-PolicyAgentAutoProvisioningFlag ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderForContainersGcpOffering. + +## EXAMPLES + +### Example 1: Create new DefenderForContainersGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderForContainersGcpOfferingObject ` + -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-containers@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "containers" ` + -DataPipelineNativeCloudConnectionServiceAccountEmailAddress "ms-defender-containers-stream@$emailSuffix" -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId "containers-streams" ` + -AuditLogsAutoProvisioningFlag $true -DefenderAgentAutoProvisioningFlag $true -PolicyAgentAutoProvisioningFlag $true ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" +``` + +```output +AuditLogsAutoProvisioningFlag : True +DataPipelineNativeCloudConnectionServiceAccountEmailAddress : ms-defender-containers-stream@myproject.iam.gserviceaccount.com +DataPipelineNativeCloudConnectionWorkloadIdentityProviderId : containers-streams +DefenderAgentAutoProvisioningFlag : True +Description : +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress : mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com +MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId : containers +MdcContainerImageAssessmentEnabled : True +MdcContainerImageAssessmentServiceAccountEmailAddress : mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com +MdcContainerImageAssessmentWorkloadIdentityProviderId : containers +NativeCloudConnectionServiceAccountEmailAddress : microsoft-defender-containers@myproject.iam.gserviceaccount.com +NativeCloudConnectionWorkloadIdentityProviderId : containers +OfferingType : DefenderForContainersGcp +PolicyAgentAutoProvisioningFlag : True +``` + + + +## PARAMETERS + +### -AuditLogsAutoProvisioningFlag +Is audit logs data collection enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataPipelineNativeCloudConnectionServiceAccountEmailAddress +The data collection service account email address in GCP for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId +The data collection GCP workload identity provider id for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefenderAgentAutoProvisioningFlag +Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SEnabled +Is Microsoft Defender container agentless discovery enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress +The service account email address in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId +The workload identity provider id in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentEnabled +Is Microsoft Defender container image assessment enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentServiceAccountEmailAddress +The service account email address in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdcContainerImageAssessmentWorkloadIdentityProviderId +The workload identity provider id in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NativeCloudConnectionServiceAccountEmailAddress +The service account email address in GCP for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NativeCloudConnectionWorkloadIdentityProviderId +The GCP workload identity provider id for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PolicyAgentAutoProvisioningFlag +Is Policy Kubernetes agent auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderForContainersGcpOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForDatabasesAwsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForDatabasesAwsOfferingObject.md new file mode 100644 index 000000000000..eaf3f50057b1 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForDatabasesAwsOfferingObject.md @@ -0,0 +1,185 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefenderfordatabasesawsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderForDatabasesAwsOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderForDatabasesAwsOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderForDatabasesAwsOfferingObject [-ArcAutoProvisioningCloudRoleArn ] + [-ArcAutoProvisioningEnabled ] [-ConfigurationPrivateLinkScope ] + [-ConfigurationProxy ] [-DatabaseDspmCloudRoleArn ] [-DatabaseDspmEnabled ] + [-RdCloudRoleArn ] [-RdEnabled ] [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderForDatabasesAwsOffering. + +## EXAMPLES + +### Example 1: Create new DefenderForDatabasesAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderForDatabasesAwsOfferingObject ` + -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" + +``` + +```output +ArcAutoProvisioningCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-ArcAutoProvisioning +ArcAutoProvisioningEnabled : True +ConfigurationPrivateLinkScope : +ConfigurationProxy : +DatabaseDspmCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DataSecurityPostureDB +DatabaseDspmEnabled : True +Description : +OfferingType : DefenderForDatabasesAws +RdCloudRoleArn : +RdEnabled : +``` + + + +## PARAMETERS + +### -ArcAutoProvisioningCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ArcAutoProvisioningEnabled +Is arc auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationPrivateLinkScope +Optional Arc private link scope resource id to link the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationProxy +Optional http proxy endpoint to use for the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseDspmCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseDspmEnabled +Is databases data security posture management (DSPM) protection enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RdCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RdEnabled +Is RDS protection enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderForDatabasesAwsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForDatabasesGcpOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForDatabasesGcpOfferingObject.md new file mode 100644 index 000000000000..cbea2d8d29f6 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForDatabasesGcpOfferingObject.md @@ -0,0 +1,137 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefenderfordatabasesgcpofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderForDatabasesGcpOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderForDatabasesGcpOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderForDatabasesGcpOfferingObject [-ArcAutoProvisioningEnabled ] + [-ConfigurationPrivateLinkScope ] [-ConfigurationProxy ] + [-DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress ] + [-DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId ] [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderForDatabasesGcpOffering. + +## EXAMPLES + +### Example 1: Create new DefenderForDatabasesGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderForDatabasesGcpOfferingObject ` + -ArcAutoProvisioningEnabled $true ` + -DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress "microsoft-databases-arc-ap@" -DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId "defender-for-databases-arc-ap" + +``` + +```output +ArcAutoProvisioningEnabled : True +ConfigurationPrivateLinkScope : +ConfigurationProxy : +DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress : microsoft-databases-arc-ap@ +DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId : defender-for-databases-arc-ap +Description : +OfferingType : DefenderForDatabasesGcp +``` + + + +## PARAMETERS + +### -ArcAutoProvisioningEnabled +Is arc auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationPrivateLinkScope +Optional Arc private link scope resource id to link the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationProxy +Optional http proxy endpoint to use for the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress +The service account email address in GCP for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId +The GCP workload identity provider id for this offering. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderForDatabasesGcpOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForServersAwsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForServersAwsOfferingObject.md new file mode 100644 index 000000000000..022b0aa4cacd --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForServersAwsOfferingObject.md @@ -0,0 +1,291 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefenderforserversawsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderForServersAwsOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderForServersAwsOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderForServersAwsOfferingObject [-ArcAutoProvisioningCloudRoleArn ] + [-ArcAutoProvisioningEnabled ] [-ConfigurationCloudRoleArn ] + [-ConfigurationExclusionTag ] + [-ConfigurationPrivateLinkScope ] [-ConfigurationProxy ] + [-ConfigurationScanningMode ] [-ConfigurationType ] [-DefenderForServerCloudRoleArn ] + [-MdeAutoProvisioningConfiguration ] [-MdeAutoProvisioningEnabled ] [-SubPlanType ] + [-VaAutoProvisioningEnabled ] [-VMScannerEnabled ] [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderForServersAwsOffering. + +## EXAMPLES + +### Example 1: Create new DefenderForServersAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderForServersAwsOfferingObject ` + -DefenderForServerCloudRoleArn "$arnPrefix/DefenderForCloud-DefenderForServers" ` + -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + -MdeAutoProvisioningEnabled $true ` + -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + -VMScannerEnabled $true -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationScanningMode Default ` + -SubPlanType P2 +``` + +```output +ArcAutoProvisioningCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-ArcAutoProvisioning +ArcAutoProvisioningEnabled : True +ConfigurationCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-AgentlessScanner +ConfigurationExclusionTag : { + } +ConfigurationPrivateLinkScope : +ConfigurationProxy : +ConfigurationScanningMode : Default +ConfigurationType : TVM +DefenderForServerCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DefenderForServers +Description : +MdeAutoProvisioningConfiguration : { + } +MdeAutoProvisioningEnabled : True +OfferingType : DefenderForServersAws +SubPlanType : P2 +VMScannerEnabled : True +VaAutoProvisioningEnabled : True +``` + + + +## PARAMETERS + +### -ArcAutoProvisioningCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ArcAutoProvisioningEnabled +Is arc auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationExclusionTag +VM tags that indicates that VM should not be scanned. +To construct, see NOTES section for CONFIGURATIONEXCLUSIONTAG properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDefenderForServersAwsOfferingVMScannersConfigurationExclusionTags +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationPrivateLinkScope +Optional Arc private link scope resource id to link the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationProxy +Optional HTTP proxy endpoint to use for the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationScanningMode +The scanning mode for the VM scan. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationType +The Vulnerability Assessment solution to be provisioned. +Can be either 'TVM' or 'Qualys'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefenderForServerCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdeAutoProvisioningConfiguration +configuration for Microsoft Defender for Endpoint autoprovisioning. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAny +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdeAutoProvisioningEnabled +Is Microsoft Defender for Endpoint auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubPlanType +The available sub plans. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaAutoProvisioningEnabled +Is Vulnerability Assessment auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMScannerEnabled +Is Microsoft Defender for Server VM scanning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderForServersAwsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForServersGcpOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForServersGcpOfferingObject.md new file mode 100644 index 000000000000..b91c3dd78f3b --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityDefenderForServersGcpOfferingObject.md @@ -0,0 +1,274 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritydefenderforserversgcpofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityDefenderForServersGcpOfferingObject + +## SYNOPSIS +Create an in-memory object for DefenderForServersGcpOffering. + +## SYNTAX + +``` +New-AzSecurityDefenderForServersGcpOfferingObject [-ArcAutoProvisioningEnabled ] + [-ConfigurationExclusionTag ] + [-ConfigurationPrivateLinkScope ] [-ConfigurationProxy ] + [-ConfigurationScanningMode ] [-ConfigurationType ] + [-DefenderForServerServiceAccountEmailAddress ] + [-DefenderForServerWorkloadIdentityProviderId ] [-MdeAutoProvisioningConfiguration ] + [-MdeAutoProvisioningEnabled ] [-SubPlanType ] [-VaAutoProvisioningEnabled ] + [-VMScannerEnabled ] [] +``` + +## DESCRIPTION +Create an in-memory object for DefenderForServersGcpOffering. + +## EXAMPLES + +### Example 1: Create new DefenderForServersGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderForServersGcpOfferingObject ` + -DefenderForServerServiceAccountEmailAddress "microsoft-defender-for-servers@$emailSuffix" -DefenderForServerWorkloadIdentityProviderId "defender-for-servers" ` + -ArcAutoProvisioningEnabled $true -MdeAutoProvisioningEnabled $true -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + -VMScannerEnabled $true -ConfigurationScanningMode Default ` + -SubPlanType P2 +``` + +```output +ArcAutoProvisioningEnabled : True +ConfigurationExclusionTag : { + } +ConfigurationPrivateLinkScope : +ConfigurationProxy : +ConfigurationScanningMode : Default +ConfigurationType : TVM +DefenderForServerServiceAccountEmailAddress : microsoft-defender-for-servers@myproject.iam.gserviceaccount.com +DefenderForServerWorkloadIdentityProviderId : defender-for-servers +Description : +MdeAutoProvisioningConfiguration : { + } +MdeAutoProvisioningEnabled : True +OfferingType : DefenderForServersGcp +SubPlanType : P2 +VMScannerEnabled : True +VaAutoProvisioningEnabled : True +``` + + + +## PARAMETERS + +### -ArcAutoProvisioningEnabled +Is arc auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationExclusionTag +VM tags that indicate that VM should not be scanned. +To construct, see NOTES section for CONFIGURATIONEXCLUSIONTAG properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDefenderForServersGcpOfferingVMScannersConfigurationExclusionTags +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationPrivateLinkScope +Optional Arc private link scope resource id to link the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationProxy +Optional HTTP proxy endpoint to use for the Arc agent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationScanningMode +The scanning mode for the VM scan. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationType +The Vulnerability Assessment solution to be provisioned. +Can be either 'TVM' or 'Qualys'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefenderForServerServiceAccountEmailAddress +The service account email address in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefenderForServerWorkloadIdentityProviderId +The workload identity provider id in GCP for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdeAutoProvisioningConfiguration +configuration for Microsoft Defender for Endpoint autoprovisioning. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAny +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MdeAutoProvisioningEnabled +Is Microsoft Defender for Endpoint auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubPlanType +The available sub plans. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaAutoProvisioningEnabled +Is Vulnerability Assessment auto provisioning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMScannerEnabled +Is Microsoft Defender for Server VM scanning enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.DefenderForServersGcpOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityGcpOrganizationalDataMemberObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityGcpOrganizationalDataMemberObject.md new file mode 100644 index 000000000000..b23234432a89 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityGcpOrganizationalDataMemberObject.md @@ -0,0 +1,82 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritygcporganizationaldatamemberobject +schema: 2.0.0 +--- + +# New-AzSecurityGcpOrganizationalDataMemberObject + +## SYNOPSIS +Create an in-memory object for GcpOrganizationalDataMember. + +## SYNTAX + +``` +New-AzSecurityGcpOrganizationalDataMemberObject [-ManagementProjectNumber ] + [-ParentHierarchyId ] [] +``` + +## DESCRIPTION +Create an in-memory object for GcpOrganizationalDataMember. + +## EXAMPLES + +### Example 1: Create new GcpOrganizationalDataMember object +```powershell +New-AzSecurityGcpOrganizationalDataMemberObject -ManagementProjectNumber "12345" -ParentHierarchyId "00000" +``` + +```output +ManagementProjectNumber OrganizationMembershipType ParentHierarchyId +----------------------- -------------------------- ----------------- +12345 Member 00000 +``` + + + +## PARAMETERS + +### -ManagementProjectNumber +The GCP management project number from organizational onboarding. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentHierarchyId +If the multi cloud account is not of membership type organization, this will be the ID of the project's parent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.GcpOrganizationalDataMember + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityGcpOrganizationalDataOrganizationObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityGcpOrganizationalDataOrganizationObject.md new file mode 100644 index 000000000000..28ff618bad4a --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityGcpOrganizationalDataOrganizationObject.md @@ -0,0 +1,99 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritygcporganizationaldataorganizationobject +schema: 2.0.0 +--- + +# New-AzSecurityGcpOrganizationalDataOrganizationObject + +## SYNOPSIS +Create an in-memory object for GcpOrganizationalDataOrganization. + +## SYNTAX + +``` +New-AzSecurityGcpOrganizationalDataOrganizationObject [-ExcludedProjectNumber ] + [-ServiceAccountEmailAddress ] [-WorkloadIdentityProviderId ] [] +``` + +## DESCRIPTION +Create an in-memory object for GcpOrganizationalDataOrganization. + +## EXAMPLES + +### Example 1: Create new GcpOrganizationalDataOrganization object +```powershell +New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2) +``` + +```output +ExcludedProjectNumber : {1, 2} +OrganizationMembershipType : Organization +OrganizationName : +ServiceAccountEmailAddress : my@email.com +WorkloadIdentityProviderId : provider +``` + + + +## PARAMETERS + +### -ExcludedProjectNumber +If the multi cloud account is of membership type organization, list of accounts excluded from offering. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceAccountEmailAddress +The service account email address which represents the organization level permissions container. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkloadIdentityProviderId +The GCP workload identity provider id which represents the permissions required to auto provision security connectors. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.GcpOrganizationalDataOrganization + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityGcpProjectEnvironmentObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityGcpProjectEnvironmentObject.md new file mode 100644 index 000000000000..f98e29153ef9 --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityGcpProjectEnvironmentObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritygcpprojectenvironmentobject +schema: 2.0.0 +--- + +# New-AzSecurityGcpProjectEnvironmentObject + +## SYNOPSIS +Create an in-memory object for GcpProjectEnvironment. + +## SYNTAX + +``` +New-AzSecurityGcpProjectEnvironmentObject [-OrganizationalData ] + [-ProjectDetailProjectId ] [-ProjectDetailProjectNumber ] [-ScanInterval ] + [] +``` + +## DESCRIPTION +Create an in-memory object for GcpProjectEnvironment. + +## EXAMPLES + +### Example 1: Create new GcpOrganizationalDataOrganization object +```powershell +$orgData = New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2) +New-AzSecurityGcpProjectEnvironmentObject -ProjectDetailProjectId "asc-sdk-samples" -ScanInterval 24 -OrganizationalData $orgData -ProjectDetailProjectNumber "1234" +``` + +```output +EnvironmentType : GcpProject +OrganizationalData : { + "organizationMembershipType": "Organization", + "excludedProjectNumbers": [ "1", "2" ], + "serviceAccountEmailAddress": "my@email.com", + "workloadIdentityProviderId": "provider" + } +ProjectDetailProjectId : asc-sdk-samples +ProjectDetailProjectName : +ProjectDetailProjectNumber : 1234 +ProjectDetailWorkloadIdentityPoolId : +ScanInterval : 24 +``` + + + +## PARAMETERS + +### -OrganizationalData +The Gcp project's organizational data. +To construct, see NOTES section for ORGANIZATIONALDATA properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IGcpOrganizationalData +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectDetailProjectId +The GCP Project id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectDetailProjectNumber +The unique GCP Project number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanInterval +Scan interval in hours (value should be between 1-hour to 24-hours). + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.GcpProjectEnvironment + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityGitHubScopeEnvironmentObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityGitHubScopeEnvironmentObject.md new file mode 100644 index 000000000000..141983d581bf --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityGitHubScopeEnvironmentObject.md @@ -0,0 +1,51 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritygithubscopeenvironmentobject +schema: 2.0.0 +--- + +# New-AzSecurityGitHubScopeEnvironmentObject + +## SYNOPSIS +Create an in-memory object for GitHubScopeEnvironment. + +## SYNTAX + +``` +New-AzSecurityGitHubScopeEnvironmentObject [] +``` + +## DESCRIPTION +Create an in-memory object for GitHubScopeEnvironment. + +## EXAMPLES + +### Example 1: Create new GitHubScopeEnvironment object +```powershell +New-AzSecurityGitHubScopeEnvironmentObject +``` + +```output +EnvironmentType +--------------- +GithubScope +``` + + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.GitHubScopeEnvironment + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityGitLabScopeEnvironmentObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityGitLabScopeEnvironmentObject.md new file mode 100644 index 000000000000..c623c408609b --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityGitLabScopeEnvironmentObject.md @@ -0,0 +1,51 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecuritygitlabscopeenvironmentobject +schema: 2.0.0 +--- + +# New-AzSecurityGitLabScopeEnvironmentObject + +## SYNOPSIS +Create an in-memory object for GitLabScopeEnvironment. + +## SYNTAX + +``` +New-AzSecurityGitLabScopeEnvironmentObject [] +``` + +## DESCRIPTION +Create an in-memory object for GitLabScopeEnvironment. + +## EXAMPLES + +### Example 1: Create new GitLabScopeEnvironment object +```powershell +New-AzSecurityGitLabScopeEnvironmentObject +``` + +```output +EnvironmentType +--------------- +GitlabScope +``` + + + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.GitLabScopeEnvironment + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/New-AzSecurityInformationProtectionAwsOfferingObject.md b/src/Security/Security.Autorest/docs/New-AzSecurityInformationProtectionAwsOfferingObject.md new file mode 100644 index 000000000000..a2acdcb48b3a --- /dev/null +++ b/src/Security/Security.Autorest/docs/New-AzSecurityInformationProtectionAwsOfferingObject.md @@ -0,0 +1,67 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/Az.Security/new-azsecurityinformationprotectionawsofferingobject +schema: 2.0.0 +--- + +# New-AzSecurityInformationProtectionAwsOfferingObject + +## SYNOPSIS +Create an in-memory object for InformationProtectionAwsOffering. + +## SYNTAX + +``` +New-AzSecurityInformationProtectionAwsOfferingObject [-InformationProtectionCloudRoleArn ] + [] +``` + +## DESCRIPTION +Create an in-memory object for InformationProtectionAwsOffering. + +## EXAMPLES + +### Example 1: Create new InformationProtectionAwsOffering object +```powershell +New-AzSecurityInformationProtectionAwsOfferingObject -InformationProtectionCloudRoleArn "arn:aws:iam::123456789012:role/myRole" +``` + +```output +Description InformationProtectionCloudRoleArn OfferingType +----------- --------------------------------- ------------ + arn:aws:iam::123456789012:role/myRole InformationProtectionAws +``` + + + +## PARAMETERS + +### -InformationProtectionCloudRoleArn +The cloud role ARN in AWS for this feature. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.InformationProtectionAwsOffering + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/README.md b/src/Security/Security.Autorest/docs/README.md new file mode 100644 index 000000000000..520e923d558e --- /dev/null +++ b/src/Security/Security.Autorest/docs/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.Security` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.Security` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/Security/Security.Autorest/docs/Remove-AzSecurityConnector.md b/src/Security/Security.Autorest/docs/Remove-AzSecurityConnector.md new file mode 100644 index 000000000000..3e4c0d837a0b --- /dev/null +++ b/src/Security/Security.Autorest/docs/Remove-AzSecurityConnector.md @@ -0,0 +1,179 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/remove-azsecurityconnector +schema: 2.0.0 +--- + +# Remove-AzSecurityConnector + +## SYNOPSIS +Deletes a security connector. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSecurityConnector -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzSecurityConnector -InputObject [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes a security connector. + +## EXAMPLES + +### Example 1: Remove security connector +```powershell +Remove-AzSecurityConnector -ResourceGroupName "securityconnectors-pwsh-tmp" -Name "ado-sdk-pwsh-test03" +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: SecurityConnectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group within the user's subscription. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Remove-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/docs/Remove-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..b119e20cc77c --- /dev/null +++ b/src/Security/Security.Autorest/docs/Remove-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,210 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/remove-azsecurityconnectordevopsconfiguration +schema: 2.0.0 +--- + +# Remove-AzSecurityConnectorDevOpsConfiguration + +## SYNOPSIS +Deletes a DevOps Connector. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzSecurityConnectorDevOpsConfiguration -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes a DevOps Connector. + +## EXAMPLES + +### Example 1: Remove DevOps Configuration for the security connector +```powershell +Remove-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName "securityconnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" +``` + + + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Update-AzSecurityConnector.md b/src/Security/Security.Autorest/docs/Update-AzSecurityConnector.md new file mode 100644 index 000000000000..a067da783fdf --- /dev/null +++ b/src/Security/Security.Autorest/docs/Update-AzSecurityConnector.md @@ -0,0 +1,318 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/update-azsecurityconnector +schema: 2.0.0 +--- + +# Update-AzSecurityConnector + +## SYNOPSIS +Updates a security connector + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSecurityConnector -Name -ResourceGroupName [-SubscriptionId ] + [-EnvironmentData ] [-EnvironmentName ] [-Etag ] + [-HierarchyIdentifier ] [-Kind ] [-Location ] [-Offering ] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSecurityConnector -InputObject [-EnvironmentData ] + [-EnvironmentName ] [-Etag ] [-HierarchyIdentifier ] [-Kind ] + [-Location ] [-Offering ] [-Tag ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates a security connector + +## EXAMPLES + +### Example 1: Update security connector +```powershell +Update-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "ado-sdk-pwsh-test03" -Tag @{myTag="v1"} +``` + +```output +EnvironmentData : { + "environmentType": "AzureDevOpsScope" + } +EnvironmentName : AzureDevOps +Etag : +HierarchyIdentifier : 9dd01e19-8aaf-43a2-8dd4-1c5992f4df35 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : ado-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorAzureDevOps" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:13:11 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:24:02 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + "myTag": "v1" + } +Type : Microsoft.Security/securityconnectors +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentData +The security connector environment data. +To construct, see NOTES section for ENVIRONMENTDATA properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityConnectorEnvironment +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentName +The multi cloud resource's cloud name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Etag +Entity tag is used for comparing two or more entities from the same requested resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HierarchyIdentifier +The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Kind +Kind of the resource + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Location where the resource is stored + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The security connector name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: SecurityConnectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Offering +A collection of offerings for the security connector. +To construct, see NOTES section for OFFERING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ICloudOffering[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group within the user's subscription. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +A list of key value pairs that describe the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityConnector + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsOrg.md b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsOrg.md new file mode 100644 index 000000000000..94c87a1ce745 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsOrg.md @@ -0,0 +1,259 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/update-azsecurityconnectorazuredevopsorg +schema: 2.0.0 +--- + +# Update-AzSecurityConnectorAzureDevOpsOrg + +## SYNOPSIS +Updates monitored Azure DevOps organization details. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSecurityConnectorAzureDevOpsOrg -OrgName -ResourceGroupName + -SecurityConnectorName [-SubscriptionId ] [-ActionableRemediation ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSecurityConnectorAzureDevOpsOrg -InputObject + [-ActionableRemediation ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Updates monitored Azure DevOps organization details. + +## EXAMPLES + +### Example 1: Update discovered AzureDevOps organization configuration +```powershell +$config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) +Update-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -OrgName "org1" -ActionableRemediation $config +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default/azureDevOpsOrgs/org1 +Name : org1 +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/24/2024 12:28:16 AM +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs +``` + + + +## PARAMETERS + +### -ActionableRemediation +Configuration payload for PR Annotations. +To construct, see NOTES section for ACTIONABLEREMEDIATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IActionableRemediation +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgName +The Azure DevOps organization name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsOrg + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsProject.md b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsProject.md new file mode 100644 index 000000000000..f1e469805f18 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsProject.md @@ -0,0 +1,293 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/update-azsecurityconnectorazuredevopsproject +schema: 2.0.0 +--- + +# Update-AzSecurityConnectorAzureDevOpsProject + +## SYNOPSIS +Updates a monitored Azure DevOps project resource. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSecurityConnectorAzureDevOpsProject -OrgName -ProjectName + -ResourceGroupName -SecurityConnectorName [-SubscriptionId ] + [-ActionableRemediation ] [-ParentOrgName ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSecurityConnectorAzureDevOpsProject -InputObject + [-ActionableRemediation ] [-ParentOrgName ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates a monitored Azure DevOps project resource. + +## EXAMPLES + +### Example 1: Update discovered AzureDevOps project configuration +```powershell +$config = New-AzSecurityConnectorActionableRemediationObject -State Disabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="Low"}) +Update-AzSecurityConnectorAzureDevOpsProject -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -OrgName "org1" -ProjectName "Build" -ActionableRemediation $config +``` + +```output +ActionableRemediation : { + "state": "Disabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "Low", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default/azureDevOpsOrgs/org1/p + rojects/Build +Name : Build +OnboardingState : Onboarded +ParentOrgName : org1 +ProjectId : 68b6a6ae-a3e4-41fa-b16e-bc4bbacd139a +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/24/2024 12:31:18 AM +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects +``` + + + +## PARAMETERS + +### -ActionableRemediation +Configuration payload for PR Annotations. +To construct, see NOTES section for ACTIONABLEREMEDIATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IActionableRemediation +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgName +The Azure DevOps organization name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentOrgName +Gets or sets parent Azure DevOps Organization name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectName +The project name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsProject + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsRepo.md b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsRepo.md new file mode 100644 index 000000000000..693919d23420 --- /dev/null +++ b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorAzureDevOpsRepo.md @@ -0,0 +1,326 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/update-azsecurityconnectorazuredevopsrepo +schema: 2.0.0 +--- + +# Update-AzSecurityConnectorAzureDevOpsRepo + +## SYNOPSIS +Updates a monitored Azure DevOps repository resource. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSecurityConnectorAzureDevOpsRepo -OrgName -ProjectName -RepoName + -ResourceGroupName -SecurityConnectorName [-SubscriptionId ] + [-ActionableRemediation ] [-ParentOrgName ] [-ParentProjectName ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSecurityConnectorAzureDevOpsRepo -InputObject + [-ActionableRemediation ] [-ParentOrgName ] [-ParentProjectName ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates a monitored Azure DevOps repository resource. + +## EXAMPLES + +### Example 1: Update discovered AzureDevOps repository configuration +```powershell +$config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="Low"} ) +Update-AzSecurityConnectorAzureDevOpsRepo -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -OrgName "org1" -ProjectName "Build" -RepoName "Build" -ActionableRemediation $config +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "Low", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default/azureDevOpsOrgs/org1/p + rojects/Build/repos/Build +Name : Build +OnboardingState : Onboarded +ParentOrgName : org1 +ParentProjectName : Build +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/24/2024 12:31:19 AM +RepoId : 64d6ea8c-6030-44db-86a4-044f13a7f43e +RepoUrl : https://dev.azure.com/org1/Build/_git/Build +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos +Visibility : +``` + + + +## PARAMETERS + +### -ActionableRemediation +Configuration payload for PR Annotations. +To construct, see NOTES section for ACTIONABLEREMEDIATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IActionableRemediation +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgName +The Azure DevOps organization name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentOrgName +Gets or sets parent Azure DevOps Organization name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentProjectName +Gets or sets parent Azure DevOps Project name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectName +The project name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepoName +The repository name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IAzureDevOpsRepository + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..451503f14afd --- /dev/null +++ b/src/Security/Security.Autorest/docs/Update-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,262 @@ +--- +external help file: +Module Name: Az.Security +online version: https://learn.microsoft.com/powershell/module/az.security/update-azsecurityconnectordevopsconfiguration +schema: 2.0.0 +--- + +# Update-AzSecurityConnectorDevOpsConfiguration + +## SYNOPSIS +Updates a DevOps Configuration. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName -SecurityConnectorName + [-SubscriptionId ] [-AuthorizationCode ] [-AutoDiscovery ] + [-TopLevelInventoryList ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzSecurityConnectorDevOpsConfiguration -InputObject [-AuthorizationCode ] + [-AutoDiscovery ] [-TopLevelInventoryList ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates a DevOps Configuration. + +## EXAMPLES + +### Example 1: Update DevOps configuration +```powershell +Update-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -AutoDiscovery Enabled +``` + +```output +AuthorizationCode : +AutoDiscovery : Enabled +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default +Name : default +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource creation successful. +ProvisioningStatusUpdateTimeUtc : +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TopLevelInventoryList : +Type : Microsoft.Security/securityConnectors/devops +``` + + + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AuthorizationCode +Gets or sets one-time OAuth code to exchange for refresh and access tokens.Only used during PUT/PATCH operations. +The secret is cleared during GET. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutoDiscovery +AutoDiscovery states. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityConnectorName +The security connector name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure subscription ID + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TopLevelInventoryList +List of top-level inventory to select when AutoDiscovery is disabled.This field is ignored when AutoDiscovery is enabled. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.ISecurityIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Security.Models.IDevOpsConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityApiCollection.md b/src/Security/Security.Autorest/examples/Get-AzSecurityApiCollection.md new file mode 100644 index 000000000000..c8a0a674ed87 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityApiCollection.md @@ -0,0 +1,48 @@ +### Example 1: Get a specific onboarded api collection resource +```powershell +Get-AzSecurityApiCollection -ResourceGroupName apicollectionstests -ServiceName "demoapimservice2" -ApiId "echo-api" +``` + +```output +BaseUrl : https://demoapimservice2.azure-api.net/echo +DiscoveredVia : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapim + service2 +DisplayName : Echo API +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapim + service2/providers/Microsoft.Security/apiCollections/echo-api +Name : echo-api +NumberOfApiEndpoint : 6 +NumberOfApiEndpointsWithSensitiveDataExposed : 0 +NumberOfExternalApiEndpoint : 0 +NumberOfInactiveApiEndpoint : 6 +NumberOfUnauthenticatedApiEndpoint : 0 +ProvisioningState : Succeeded +ResourceGroupName : apicollectionstests +SensitivityLabel : +Type : microsoft.security/apicollections +``` + +### Example 2: List onboarded api collections by service name +```powershell +Get-AzSecurityApiCollection -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2" +``` + +```output +Name ResourceGroupName +---- ----------------- +echo-api apicollectionstests +echo-api-2 apicollectionstests +``` + +### Example 3: List onboarded api collections by subscription +```powershell +Get-AzSecurityApiCollection +``` + +```output +Name ResourceGroupName +---- ----------------- +echo-api apicollectionstests +echo-api-2 apicollectionstests +``` + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnector.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnector.md new file mode 100644 index 000000000000..8cb81e982eb3 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnector.md @@ -0,0 +1,47 @@ +### Example 1: Get Security Connector resource by name +```powershell +Get-AzSecurityConnector -ResourceGroupName "dfdtest-sdk" -Name "dfdsdktests-azdo-01" +``` + +```output +EnvironmentData : { + "environmentType": "AzureDevOpsScope" + } +EnvironmentName : AzureDevOps +Etag : +HierarchyIdentifier : 4a8eb7f1-f533-48c5-b102-9b09e90906b7 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01 +Kind : +Location : centralus +Name : dfdsdktests-azdo-01 +Offering : {{ + "offeringType": "CspmMonitorAzureDevOps" + }} +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : 12/7/2023 6:38:36 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/14/2024 2:11:46 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : {} +Type : Microsoft.Security/securityconnectors +``` + + +### Example 2: List Security Connectors by subscription +```powershell +Get-AzSecurityConnector +``` + +```output +Name ResourceGroupName EnvironmentName Location HierarchyIdentifier +---- ----------------- --------------- -------- ------------------- +dfdsdktests-azdo-01 dfdtest-sdk AzureDevOps centralus 4a8eb7f1-f533-48c5-b102-9b09e90906b7 +dfdsdktests-gl-01 dfdtest-sdk GitLab centralus 7a1f4efe-f8c6-48e7-b7ef-1b45994ed602 +dfdsdktests-gh-01 dfdtest-sdk Github centralus bc12ba4d-b89c-486e-85e1-d803e7d80525 +aws-sdktest01 securityconnectors-tests AWS CentralUS 891376984375 +gcp-sdktest01 securityconnectors-tests GCP CentralUS 843025268399 +``` + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsOrg.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsOrg.md new file mode 100644 index 000000000000..12065283b013 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsOrg.md @@ -0,0 +1,48 @@ +### Example 1: Get discovered AzureDevOps organization by name +```powershell +Get-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:49:40 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs +``` + +### Example 2: List discovered AzureDevOps organizations +```powershell +Get-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests dfdtest-sdk +dfdsdktests2 dfdtest-sdk +``` + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md new file mode 100644 index 000000000000..7e72c9660178 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.md @@ -0,0 +1,36 @@ +### Example 1: List available AzureDevOps organizations for onboarding +```powershell +Get-AzSecurityConnectorAzureDevOpsOrgAvailable -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:49:40 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs +``` + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsProject.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsProject.md new file mode 100644 index 000000000000..bc68361cc90d --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsProject.md @@ -0,0 +1,52 @@ +### Example 1: Get discovered AzureDevOps project by organization and project name +```powershell +Get-AzSecurityConnectorAzureDevOpsProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests -ProjectName ContosoSDKDfd +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/Co + ntosoSDKDfd +Name : ContosoSDKDfd +OnboardingState : Onboarded +ParentOrgName : dfdsdktests +ProjectId : 161fb6f6-f2fe-4616-a627-293b788ff583 +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:52:43 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects +``` + +### Example 2: List discovered AzureDevOps projects +```powershell +Get-AzSecurityConnectorAzureDevOpsProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests +``` + +```output +Name ResourceGroupName +---- ----------------- +ContosoSDKDfd dfdtest-sdk +ContosoEnterprise dfdtest-sdk +``` + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsRepo.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsRepo.md new file mode 100644 index 000000000000..9e7ab407962f --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorAzureDevOpsRepo.md @@ -0,0 +1,55 @@ +### Example 1: Get discovered AzureDevOps repository by organization, project and repo name +```powershell +Get-AzSecurityConnectorAzureDevOpsRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests -ProjectName ContosoSDKDfd -RepoName TestApp0 +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Enabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/Co + ntosoSDKDfd/repos/TestApp0 +Name : TestApp0 +OnboardingState : Onboarded +ParentOrgName : dfdsdktests +ParentProjectName : ContosoSDKDfd +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/23/2024 6:52:44 PM +RepoId : 35cd4811-63c7-4043-8587-f0a9cf37709e +RepoUrl : https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp0 +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos +Visibility : +``` + +### Example 2: List discovered AzureDevOps repositories +```powershell +Get-AzSecurityConnectorAzureDevOpsRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 -OrgName dfdsdktests -ProjectName ContosoSDKDfd +``` + +```output +Name ResourceGroupName +---- ----------------- +ContosoSDKDfd dfdtest-sdk +TestApp0 dfdtest-sdk +TestApp2 dfdtest-sdk +``` + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..0e04e677ea92 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,35 @@ +### Example 1: Get Security Connector DevOps Configuration +```powershell +Get-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-azdo-01 +``` + +```output +AuthorizationCode : +AutoDiscovery : Disabled +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default +Name : default +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource creation successful. +ProvisioningStatusUpdateTimeUtc : +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TopLevelInventoryList : +Type : Microsoft.Security/securityConnectors/devops +``` + +### Example 2: Try to get non existing Security Connector DevOps Configuration +```powershell +Get-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName securityconnectors-tests -SecurityConnectorName aws-sdktest01 +``` + +```output +Get-AzSecurityConnectorDevOpsConfiguration_Get: DevOps configuration was not found +``` + + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubOwner.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubOwner.md new file mode 100644 index 000000000000..60b97698e19a --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubOwner.md @@ -0,0 +1,38 @@ +### Example 1: Get discovered GitHub owner by name +```powershell +Get-AzSecurityConnectorGitHubOwner -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 -OwnerName dfdsdktests +``` + +```output +GitHubInternalId : 45003365 +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +OwnerUrl : https://github.com/dfdsdktests +ProvisioningState : Pending +ProvisioningStatusMessage : Beginning provisioning of GitHub connector. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 8:46:22 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitHubOwners +``` + +### Example 2: List discovered GitHub owners +```powershell +Get-AzSecurityConnectorGitHubOwner -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests dfdtest-sdk +dfdsdktests2 dfdtest-sdk +``` + + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubOwnerAvailable.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubOwnerAvailable.md new file mode 100644 index 000000000000..723544b7b664 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubOwnerAvailable.md @@ -0,0 +1,25 @@ +### Example 1: List available GitHub owners for onboarding +```powershell +Get-AzSecurityConnectorGitHubOwnerAvailable -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 +``` + +```output +GitHubInternalId : 45003365 +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +OwnerUrl : https://github.com/dfdsdktests +ProvisioningState : Pending +ProvisioningStatusMessage : Beginning provisioning of GitHub connector. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 8:46:22 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitHubOwners +``` + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubRepo.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubRepo.md new file mode 100644 index 000000000000..06358065c811 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitHubRepo.md @@ -0,0 +1,43 @@ +### Example 1: Get discovered GitHub repository by name +```powershell +Get-AzSecurityConnectorGitHubRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 -OwnerName dfdsdktests -RepoName TestApp0 +``` + +```output +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0 +Name : TestApp0 +OnboardingState : Onboarded +ParentOwnerName : dfdsdktests +ProvisioningState : +ProvisioningStatusMessage : +ProvisioningStatusUpdateTimeUtc : 2/23/2024 8:46:23 PM +RepoFullName : +RepoId : 728418798 +RepoName : TestApp0 +RepoUrl : https://github.com/dfdsdktests/TestApp0 +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitHubOwners/repos +``` + + +### Example 2: List discovered GitHub repositories +```powershell +Get-AzSecurityConnectorGitHubRepo -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gh-01 -OwnerName dfdsdktests +``` + +```output + +Name ResourceGroupName +---- ----------------- +TestApp0 dfdtest-sdk +TestApp1 dfdtest-sdk +``` + + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabGroup.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabGroup.md new file mode 100644 index 000000000000..d610749a2e8e --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabGroup.md @@ -0,0 +1,39 @@ +### Example 1: Get discovered GitLab group by name +```powershell +Get-AzSecurityConnectorGitLabGroup -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests +``` + +```output +FullyQualifiedFriendlyName : Defender for DevOps SDK Tests +FullyQualifiedName : dfdsdktests +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource modification successful. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 10:42:28 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitLabGroups +Url : https://gitlab.com/groups/dfdsdktests +``` + +### Example 2: List discovered GitLab groups +```powershell +Get-AzSecurityConnectorGitLabGroup -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests dfdtest-sdk +dfdsdktests2 dfdtest-sdk +``` + + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabGroupAvailable.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabGroupAvailable.md new file mode 100644 index 000000000000..741b3485fad3 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabGroupAvailable.md @@ -0,0 +1,25 @@ +### Example 1: List available GitLab groups for onboarding +```powershell +Get-AzSecurityConnectorGitLabGroupAvailable -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 +``` + +```output +FullyQualifiedFriendlyName : Defender for DevOps SDK Tests +FullyQualifiedName : dfdsdktests +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests +Name : dfdsdktests +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource modification successful. +ProvisioningStatusUpdateTimeUtc : 2/23/2024 10:42:28 PM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitLabGroups +Url : https://gitlab.com/groups/dfdsdktests +``` + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabProject.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabProject.md new file mode 100644 index 000000000000..aba6413de1d4 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabProject.md @@ -0,0 +1,40 @@ +### Example 1: Get discovered GitLab project by name +```powershell +Get-AzSecurityConnectorGitLabProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests -ProjectName testapp0 +``` + +```output +FullyQualifiedFriendlyName : Defender for DevOps SDK Tests / TestApp0 +FullyQualifiedName : dfdsdktests$testapp0 +FullyQualifiedParentGroupName : dfdsdktests +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0 +Name : testapp0 +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource modification successful. +ProvisioningStatusUpdateTimeUtc : 1/1/1970 12:00:00 AM +ResourceGroupName : dfdtest-sdk +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/gitLabGroups/projects +Url : https://gitlab.com/dfdsdktests/testapp0 +``` + +### Example 2: List discovered GitLab projects +```powershell +Get-AzSecurityConnectorGitLabProject -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests +``` + +```output +Name ResourceGroupName +---- ----------------- +testapp10 dfdtest-sdk +testapp11 dfdtest-sdk +testapp0 dfdtest-sdk +``` + + diff --git a/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabSubgroup.md b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabSubgroup.md new file mode 100644 index 000000000000..7f5d94c682d3 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Get-AzSecurityConnectorGitLabSubgroup.md @@ -0,0 +1,13 @@ +### Example 1: List discovered GitLab subgroups +```powershell +Get-AzSecurityConnectorGitLabSubgroup -ResourceGroupName dfdtest-sdk -SecurityConnectorName dfdsdktests-gl-01 -GroupFqName dfdsdktests +``` + +```output +Name ResourceGroupName +---- ----------------- +dfdsdktests$testsubgroup1$testsubgroupNested dfdtest-sdk +dfdsdktests$testsubgroup1 dfdtest-sdk +``` + + diff --git a/src/Security/Security.Autorest/examples/Invoke-AzSecurityApiCollectionApimOffboard.md b/src/Security/Security.Autorest/examples/Invoke-AzSecurityApiCollectionApimOffboard.md new file mode 100644 index 000000000000..7509da52b520 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Invoke-AzSecurityApiCollectionApimOffboard.md @@ -0,0 +1,5 @@ +### Example 1: Offboard an Azure API Management API to Microsoft Defender for APIs. +```powershell +Invoke-AzSecurityApiCollectionApimOffboard -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2" -ApiId "echo-api-2" +``` + diff --git a/src/Security/Security.Autorest/examples/Invoke-AzSecurityApiCollectionApimOnboard.md b/src/Security/Security.Autorest/examples/Invoke-AzSecurityApiCollectionApimOnboard.md new file mode 100644 index 000000000000..bb574005a514 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Invoke-AzSecurityApiCollectionApimOnboard.md @@ -0,0 +1,23 @@ +### Example 1: Onboard an Azure API Management API to Microsoft Defender for APIs. +```powershell +Invoke-AzSecurityApiCollectionApimOnboard -ResourceGroupName "apicollectionstests" -ServiceName "demoapimservice2" -ApiId "echo-api-2" +``` + +```output +BaseUrl : https://demoapimservice2.azure-api.net +DiscoveredVia : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2 +DisplayName : Echo API 2 +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/ech + o-api-2 +Name : echo-api-2 +NumberOfApiEndpoint : 0 +NumberOfApiEndpointsWithSensitiveDataExposed : 0 +NumberOfExternalApiEndpoint : 0 +NumberOfInactiveApiEndpoint : 0 +NumberOfUnauthenticatedApiEndpoint : 0 +ProvisioningState : Succeeded +ResourceGroupName : apicollectionstests +SensitivityLabel : +Type : microsoft.security/apicollections +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityAwsEnvironmentObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityAwsEnvironmentObject.md new file mode 100644 index 000000000000..d3d5ee92cd07 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityAwsEnvironmentObject.md @@ -0,0 +1,36 @@ +### Example 1: Create new AwsEnvironment object as member +```powershell +$member = New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123" +New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $member +``` + +```output +AccountName : +EnvironmentType : AwsAccount +OrganizationalData : { + "organizationMembershipType": "Member", + "parentHierarchyId": "123" + } +Region : {Central US} +ScanInterval : 24 +``` + + +### Example 2: Create new AwsEnvironment object as organization +```powershell +$organization = New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012" +New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $organization +``` + +```output +AccountName : +EnvironmentType : AwsAccount +OrganizationalData : { + "organizationMembershipType": "Organization", + "stacksetName": "myAwsStackSet", + "excludedAccountIds": [ "123456789012" ] + } +Region : {Central US} +ScanInterval : 24 +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityAwsOrganizationalDataMasterObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityAwsOrganizationalDataMasterObject.md new file mode 100644 index 000000000000..2bb76ed09379 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityAwsOrganizationalDataMasterObject.md @@ -0,0 +1,11 @@ +### Example 1: Create new AwsOrganizationalDataMaster object +```powershell +New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012" +``` + +```output +ExcludedAccountId OrganizationMembershipType StacksetName +----------------- -------------------------- ------------ +{123456789012} Organization myAwsStackSet +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityAwsOrganizationalDataMemberObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityAwsOrganizationalDataMemberObject.md new file mode 100644 index 000000000000..4a82f31c316a --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityAwsOrganizationalDataMemberObject.md @@ -0,0 +1,13 @@ +### Example 1: Create new AwsOrganizationalDataMember object +```powershell +New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123" +``` + +```output +OrganizationMembershipType ParentHierarchyId +-------------------------- ----------------- +Member 123 +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityAzureDevOpsScopeEnvironmentObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityAzureDevOpsScopeEnvironmentObject.md new file mode 100644 index 000000000000..e29de8522f78 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityAzureDevOpsScopeEnvironmentObject.md @@ -0,0 +1,13 @@ +### Example 1: Create new AzureDevOpsScopeEnvironment object +```powershell +New-AzSecurityAzureDevOpsScopeEnvironmentObject +``` + +```output +EnvironmentType +--------------- +AzureDevOpsScope +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityConnector.md b/src/Security/Security.Autorest/examples/New-AzSecurityConnector.md new file mode 100644 index 000000000000..a138fd11ebd6 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityConnector.md @@ -0,0 +1,345 @@ +### Example 1: Create AWS security connector +```powershell +$account = "891376984375" +$arnPrefix = "arn:aws:iam::$($account):role" + +$cspmMonitorOffering = New-AzSecurityCspmMonitorAwsOfferingObject -NativeCloudConnectionCloudRoleArn "$arnPrefix/CspmMonitorAws" + +$dcspmOffering = New-AzSecurityDefenderCspmAwsOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryCloudRoleArn "$arnPrefix/SensitiveDataDiscovery" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" ` + -CiemDiscoveryCloudRoleArn "$arnPrefix/DefenderForCloud-Ciem" -CiemOidcAzureActiveDirectoryAppName "mciem-aws-oidc-connector" -CiemOidcCloudRoleArn "$arnPrefix/DefenderForCloud-OidcCiem" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" + +$defenderForContainersOffering = New-AzSecurityDefenderForContainersAwsOfferingObject ` + -AutoProvisioning $true -KuberneteServiceCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s" -KuberneteScubaReaderCloudRoleArn "$arnPrefix/DefenderForCloud-DataCollection" ` + -KinesiToS3CloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-kinesis-to-s3" -CloudWatchToKinesiCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" ` + -KubeAuditRetentionTime 30 -ScubaExternalId "a47ae0a2-7bf7-482a-897a-7a139d30736c" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -EnableContainerVulnerabilityAssessment $false + +$environment = New-AzSecurityAwsEnvironmentObject -ScanInterval 24 + +New-AzSecurityConnector -Name "aws-sdktest01" -ResourceGroupName "securityConnectors-tests" ` + -EnvironmentData $environment -EnvironmentName AWS -HierarchyIdentifier "$account" ` + -Offering @($cspmMonitorOffering, $dcspmOffering, $defenderForContainersOffering) ` + -Location "CentralUS" +``` + +```output +EnvironmentData : { + "environmentType": "AwsAccount", + "regions": [ ], + "scanInterval": 24 + } +EnvironmentName : AWS +Etag : +HierarchyIdentifier : 891376984375 +HierarchyIdentifierTrialEndDate : 3/24/2024 12:00:00 AM +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-tests/providers/Microsoft.Security/securityConnectors/aws-sdktes + t01 +Kind : +Location : CentralUS +Name : aws-sdktest01 +Offering : {{ + "offeringType": "CspmMonitorAws", + "nativeCloudConnection": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/CspmMonitorAws" + } + }, { + "offeringType": "DefenderCspmAws", + "vmScanners": { + "configuration": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-AgentlessScanner", + "scanningMode": "Default" + }, + "enabled": true + }, + "dataSensitivityDiscovery": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/SensitiveDataDiscovery" + }, + "databasesDspm": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-DataSecurityPostureDB" + }, + "ciem": { + "ciemDiscovery": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Ciem" + }, + "ciemOidc": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-OidcCiem", + "azureActiveDirectoryAppName": "mciem-aws-oidc-connector" + } + }, + "mdcContainersImageAssessment": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersImageAssessmentRole" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersAgentlessDiscoveryK8sRole" + } + }, { + "offeringType": "DefenderForContainersAws", + "kubernetesService": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s" + }, + "kubernetesScubaReader": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-DataCollection" + }, + "cloudWatchToKinesis": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" + }, + "kinesisToS3": { + "cloudRoleArn": "arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s-kinesis-to-s3" + }, + "mdcContainersImageAssessment": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersImageAssessmentRole" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "cloudRoleArn": "arn:aws:iam::891376984375:role/MDCContainersAgentlessDiscoveryK8sRole" + }, + "enableContainerVulnerabilityAssessment": false, + "autoProvisioning": true, + "kubeAuditRetentionTime": 30, + "scubaExternalId": "a47ae0a2-7bf7-482a-897a-7a139d30736c" + }} +ResourceGroupName : securityconnectors-tests +SystemDataCreatedAt : 2/22/2024 11:45:53 PM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/22/2024 11:45:53 PM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + +### Example 2: Create GCP security connector +```powershell +$account = "843025268399" +$emailSuffix = "myproject.iam.gserviceaccount.com" +$cspmMonitorOffering = New-AzSecurityCspmMonitorGcpOfferingObject -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-cspm@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "cspm" + +$dcspmOffering = New-AzSecurityDefenderCspmGcpOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationExclusionTag @{key="value"} ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryServiceAccountEmailAddress "mdc-data-sec-posture-storage@$emailSuffix" -DataSensitivityDiscoveryWorkloadIdentityProviderId "data-security-posture-storage" ` + -CiemDiscoveryServiceAccountEmailAddress "microsoft-defender-ciem@$emailSuffix" -CiemDiscoveryAzureActiveDirectoryAppName "mciem-gcp-oidc-app" -CiemDiscoveryWorkloadIdentityProviderId "ciem-discovery" + +$defenderForContainersOffering = New-AzSecurityDefenderForContainersGcpOfferingObject ` + -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-containers@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "containers" ` + -DataPipelineNativeCloudConnectionServiceAccountEmailAddress "ms-defender-containers-stream@$emailSuffix" -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId "containers-streams" ` + -AuditLogsAutoProvisioningFlag $true -DefenderAgentAutoProvisioningFlag $true -PolicyAgentAutoProvisioningFlag $true ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" + +$environment = New-AzSecurityGcpProjectEnvironmentObject -ScanInterval 24 -ProjectDetailProjectId "asc-sdk-samples" -ProjectDetailProjectNumber "$account" + +New-AzSecurityConnector -Name "gcp-sdktest01" -ResourceGroupName "securityConnectors-tests" -EnvironmentData $environment -EnvironmentName GCP -HierarchyIdentifier "$account" ` + -Offering @($cspmMonitorOffering, $dcspmOffering, $defenderForContainersOffering) -Location "CentralUS" +``` + +```output +EnvironmentData : { + "environmentType": "GcpProject", + "projectDetails": { + "projectNumber": "843025268399", + "projectId": "asc-sdk-samples" + }, + "scanInterval": 24 + } +EnvironmentName : GCP +Etag : +HierarchyIdentifier : 843025268399 +HierarchyIdentifierTrialEndDate : 3/24/2024 12:00:00 AM +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-tests/providers/Microsoft.Security/securityConnectors/gcp-sdktest01 +Kind : +Location : CentralUS +Name : gcp-sdktest01 +Offering : {{ + "offeringType": "CspmMonitorGcp", + "nativeCloudConnection": { + "workloadIdentityProviderId": "cspm", + "serviceAccountEmailAddress": "microsoft-defender-cspm@myproject.iam.gserviceaccount.com" + } + }, { + "offeringType": "DefenderCspmGcp", + "ciemDiscovery": { + "workloadIdentityProviderId": "ciem-discovery", + "serviceAccountEmailAddress": "microsoft-defender-ciem@myproject.iam.gserviceaccount.com", + "azureActiveDirectoryAppName": "mciem-gcp-oidc-app" + }, + "vmScanners": { + "configuration": { + "scanningMode": "Default", + "exclusionTags": { + "key": "value" + } + }, + "enabled": true + }, + "dataSensitivityDiscovery": { + "enabled": true, + "workloadIdentityProviderId": "data-security-posture-storage", + "serviceAccountEmailAddress": "mdc-data-sec-posture-storage@myproject.iam.gserviceaccount.com" + }, + "mdcContainersImageAssessment": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com" + } + }, { + "offeringType": "DefenderForContainersGcp", + "nativeCloudConnection": { + "serviceAccountEmailAddress": "microsoft-defender-containers@myproject.iam.gserviceaccount.com", + "workloadIdentityProviderId": "containers" + }, + "dataPipelineNativeCloudConnection": { + "serviceAccountEmailAddress": "ms-defender-containers-stream@myproject.iam.gserviceaccount.com", + "workloadIdentityProviderId": "containers-streams" + }, + "mdcContainersImageAssessment": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com" + }, + "mdcContainersAgentlessDiscoveryK8s": { + "enabled": true, + "workloadIdentityProviderId": "containers", + "serviceAccountEmailAddress": "mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com" + }, + "auditLogsAutoProvisioningFlag": true, + "defenderAgentAutoProvisioningFlag": true, + "policyAgentAutoProvisioningFlag": true + }} +ResourceGroupName : securityconnectors-tests +SystemDataCreatedAt : 2/22/2024 11:45:53 PM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/22/2024 11:45:53 PM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : {} +Type : Microsoft.Security/securityconnectors +``` + +### Example 3: Create AzureDevOps security connector +```powershell +New-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "ado-sdk-pwsh-test03" ` + -EnvironmentName AzureDevOps -EnvironmentData (New-AzSecurityAzureDevOpsScopeEnvironmentObject) ` + -HierarchyIdentifier ([guid]::NewGuid().ToString()) -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorAzureDevOpsOfferingObject) +``` + +```output +EnvironmentData : { + "environmentType": "AzureDevOpsScope" + } +EnvironmentName : AzureDevOps +Etag : +HierarchyIdentifier : 9dd01e19-8aaf-43a2-8dd4-1c5992f4df35 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : ado-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorAzureDevOps" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:13:11 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:13:11 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + +### Example 4: Create GitHub security connector +```powershell +New-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "gh-sdk-pwsh-test03" ` + -EnvironmentName GitHub -EnvironmentData (New-AzSecurityGitHubScopeEnvironmentObject) ` + -HierarchyIdentifier ([guid]::NewGuid().ToString()) -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorGithubOfferingObject) +``` + +```output +EnvironmentData : { + "environmentType": "GithubScope" + } +EnvironmentName : Github +Etag : +HierarchyIdentifier : e8661d05-8003-46ae-b687-fa83746f44f3 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : gh-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorGithub" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:55:33 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:55:33 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + +### Example 5: Create GitLab security connector +```powershell +New-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "gl-sdk-pwsh-test03" ` + -EnvironmentName GitLab -EnvironmentData (New-AzSecurityGitLabScopeEnvironmentObject) ` + -HierarchyIdentifier ([guid]::NewGuid().ToString()) -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorGitLabOfferingObject) +``` + +```output +EnvironmentData : { + "environmentType": "GitLabScope" + } +EnvironmentName : GitLab +Etag : +HierarchyIdentifier : e8661d05-8003-46ae-b687-fa83746f44f3 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : gl-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorGitLab" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:55:33 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:55:33 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + } +Type : Microsoft.Security/securityconnectors +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityConnectorActionableRemediationObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityConnectorActionableRemediationObject.md new file mode 100644 index 000000000000..75ae99d380e2 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityConnectorActionableRemediationObject.md @@ -0,0 +1,23 @@ +### Example 1: Create new ActionableRemediation object +```powershell +New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled ` + -BranchConfiguration @{AnnotateDefaultBranch="Enabled"; branchName=@("main", "hotfix")} -CategoryConfiguration @( @{category="First"; minimumSeverityLevel="High"}, @{category="Second"; minimumSeverityLevel="Low"}) +``` + +```output +BranchConfiguration : { + "branchNames": [ "main", "hotfix" ], + "annotateDefaultBranch": "Enabled" + } +CategoryConfiguration : {{ + "minimumSeverityLevel": "High", + "category": "First" + }, { + "minimumSeverityLevel": "Low", + "category": "Second" + }} +InheritFromParentState : Disabled +State : Enabled +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/examples/New-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..2230f7004fee --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,24 @@ +### Example 1: Create new DevOps Configuration for the security connector +```powershell +New-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName "securityconnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -AutoDiscovery Disabled -TopLevelInventoryList @("org1", "org2") -AuthorizationCode "myAuthorizationCode" +``` + +```output +AuthorizationCode : +AutoDiscovery : Disabled +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default +Name : default +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource creation successful. +ProvisioningStatusUpdateTimeUtc : +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TopLevelInventoryList : +Type : Microsoft.Security/securityConnectors/devops +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorAwsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorAwsOfferingObject.md new file mode 100644 index 000000000000..9756a8f7ffc3 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorAwsOfferingObject.md @@ -0,0 +1,13 @@ +### Example 1: Create new CspmMonitorAwsOffering object +```powershell +New-AzSecurityCspmMonitorAwsOfferingObject -NativeCloudConnectionCloudRoleArn "arn:aws:iam::123456789012:role/CspmMonitorAws" +``` + +```output +Description NativeCloudConnectionCloudRoleArn OfferingType +----------- --------------------------------- ------------ + arn:aws:iam::123456789012:role/CspmMonitorAws CspmMonitorAws +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md new file mode 100644 index 000000000000..db5e687db9ff --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.md @@ -0,0 +1,12 @@ +### Example 1: Create new CspmMonitorAzureDevOpsOffering object +```powershell +New-AzSecurityCspmMonitorAzureDevOpsOfferingObject +``` + +```output +Description OfferingType +----------- ------------ + CspmMonitorAzureDevOps +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGcpOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGcpOfferingObject.md new file mode 100644 index 000000000000..64e821b0d554 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGcpOfferingObject.md @@ -0,0 +1,13 @@ +### Example 1: Create new CspmMonitorGcpOffering object +```powershell +New-AzSecurityCspmMonitorGcpOfferingObject -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-cspm@asc-sdk-samples.iam.gserviceaccount.com" -NativeCloudConnectionWorkloadIdentityProviderId "cspm" +``` + +```output +Description NativeCloudConnectionServiceAccountEmailAddress NativeCloudConnectionWorkloadIdentityProviderId OfferingType +----------- ----------------------------------------------- ----------------------------------------------- ------------ + microsoft-defender-cspm@asc-sdk-samples.iam.gserviceaccount.com cspm CspmMonitorGcp +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGitLabOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGitLabOfferingObject.md new file mode 100644 index 000000000000..e1a4157532e2 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGitLabOfferingObject.md @@ -0,0 +1,13 @@ +### Example 1: Create new CspmMonitorGitLabOffering object +```powershell +New-AzSecurityCspmMonitorGitLabOfferingObject +``` + +```output +Description OfferingType +----------- ------------ + CspmMonitorGitLab +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGithubOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGithubOfferingObject.md new file mode 100644 index 000000000000..a938887cf13b --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityCspmMonitorGithubOfferingObject.md @@ -0,0 +1,12 @@ +### Example 1: Create new CspmMonitorGithubOffering object +```powershell +New-AzSecurityCspmMonitorGithubOfferingObject +``` + +```output +Description OfferingType +----------- ------------ + CspmMonitorGithub +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderCspmAwsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderCspmAwsOfferingObject.md new file mode 100644 index 000000000000..ef875cc2b584 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderCspmAwsOfferingObject.md @@ -0,0 +1,36 @@ +### Example 1: Create new DefenderCspmAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderCspmAwsOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationExclusionTag @{key="value"} ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryCloudRoleArn "$arnPrefix/SensitiveDataDiscovery" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" ` + -CiemDiscoveryCloudRoleArn "$arnPrefix/DefenderForCloud-Ciem" -CiemOidcAzureActiveDirectoryAppName "mciem-aws-oidc-connector" -CiemOidcCloudRoleArn "$arnPrefix/DefenderForCloud-OidcCiem" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" +``` + +```output +CiemDiscoveryCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Ciem +CiemOidcAzureActiveDirectoryAppName : mciem-aws-oidc-connector +CiemOidcCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-OidcCiem +ConfigurationCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-AgentlessScanner +ConfigurationExclusionTag : { + "key": "value" + } +ConfigurationScanningMode : Default +DataSensitivityDiscoveryCloudRoleArn : arn:aws:iam::123456789012:role/SensitiveDataDiscovery +DataSensitivityDiscoveryEnabled : True +DatabaseDspmCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DataSecurityPostureDB +DatabaseDspmEnabled : True +Description : +MdcContainerAgentlessDiscoveryK8SCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersAgentlessDiscoveryK8sRole +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerImageAssessmentCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersImageAssessmentRole +MdcContainerImageAssessmentEnabled : True +OfferingType : DefenderCspmAws +VMScannerEnabled : True +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderCspmGcpOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderCspmGcpOfferingObject.md new file mode 100644 index 000000000000..5342b639af98 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderCspmGcpOfferingObject.md @@ -0,0 +1,33 @@ +### Example 1: Create new DefenderCspmGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderCspmGcpOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationExclusionTag @{key="value"} ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryServiceAccountEmailAddress "mdc-data-sec-posture-storage@$emailSuffix" -DataSensitivityDiscoveryWorkloadIdentityProviderId "data-security-posture-storage" ` + -CiemDiscoveryServiceAccountEmailAddress "microsoft-defender-ciem@$emailSuffix" -CiemDiscoveryAzureActiveDirectoryAppName "mciem-gcp-oidc-app" -CiemDiscoveryWorkloadIdentityProviderId "ciem-discovery" +``` + +```output +CiemDiscoveryAzureActiveDirectoryAppName : mciem-gcp-oidc-app +CiemDiscoveryServiceAccountEmailAddress : microsoft-defender-ciem@myproject.iam.gserviceaccount.com +CiemDiscoveryWorkloadIdentityProviderId : ciem-discovery +ConfigurationExclusionTag : { + "key": "value" + } +ConfigurationScanningMode : Default +DataSensitivityDiscoveryEnabled : True +DataSensitivityDiscoveryServiceAccountEmailAddress : mdc-data-sec-posture-storage@myproject.iam.gserviceaccount.com +DataSensitivityDiscoveryWorkloadIdentityProviderId : data-security-posture-storage +Description : +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress : mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com +MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId : containers +MdcContainerImageAssessmentEnabled : True +MdcContainerImageAssessmentServiceAccountEmailAddress : mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com +MdcContainerImageAssessmentWorkloadIdentityProviderId : containers +OfferingType : DefenderCspmGcp +VMScannerEnabled : True +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForContainersAwsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForContainersAwsOfferingObject.md new file mode 100644 index 000000000000..942f10da412b --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForContainersAwsOfferingObject.md @@ -0,0 +1,33 @@ +### Example 1: Create new DefenderForContainersAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderForContainersAwsOfferingObject ` + -AutoProvisioning $true -KuberneteServiceCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s" -KuberneteScubaReaderCloudRoleArn "$arnPrefix/DefenderForCloud-DataCollection" ` + -KinesiToS3CloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-kinesis-to-s3" -CloudWatchToKinesiCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" ` + -KubeAuditRetentionTime 30 -ScubaExternalId "a47ae0a2-7bf7-482a-897a-7a139d30736c" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -EnableContainerVulnerabilityAssessment $false +``` + +```output +AutoProvisioning : True +CloudWatchToKinesiCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis +ContainerVulnerabilityAssessmentCloudRoleArn : +ContainerVulnerabilityAssessmentTaskCloudRoleArn : +Description : +EnableContainerVulnerabilityAssessment : False +KinesiToS3CloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Containers-K8s-kinesis-to-s3 +KubeAuditRetentionTime : 30 +KuberneteScubaReaderCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DataCollection +KuberneteServiceCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-Containers-K8s +MdcContainerAgentlessDiscoveryK8SCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersAgentlessDiscoveryK8sRole +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerImageAssessmentCloudRoleArn : arn:aws:iam::123456789012:role/MDCContainersImageAssessmentRole +MdcContainerImageAssessmentEnabled : True +OfferingType : DefenderForContainersAws +ScubaExternalId : a47ae0a2-7bf7-482a-897a-7a139d30736c +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForContainersGcpOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForContainersGcpOfferingObject.md new file mode 100644 index 000000000000..165ec4ccc892 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForContainersGcpOfferingObject.md @@ -0,0 +1,29 @@ +### Example 1: Create new DefenderForContainersGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderForContainersGcpOfferingObject ` + -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-containers@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "containers" ` + -DataPipelineNativeCloudConnectionServiceAccountEmailAddress "ms-defender-containers-stream@$emailSuffix" -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId "containers-streams" ` + -AuditLogsAutoProvisioningFlag $true -DefenderAgentAutoProvisioningFlag $true -PolicyAgentAutoProvisioningFlag $true ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" +``` + +```output +AuditLogsAutoProvisioningFlag : True +DataPipelineNativeCloudConnectionServiceAccountEmailAddress : ms-defender-containers-stream@myproject.iam.gserviceaccount.com +DataPipelineNativeCloudConnectionWorkloadIdentityProviderId : containers-streams +DefenderAgentAutoProvisioningFlag : True +Description : +MdcContainerAgentlessDiscoveryK8SEnabled : True +MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress : mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com +MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId : containers +MdcContainerImageAssessmentEnabled : True +MdcContainerImageAssessmentServiceAccountEmailAddress : mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com +MdcContainerImageAssessmentWorkloadIdentityProviderId : containers +NativeCloudConnectionServiceAccountEmailAddress : microsoft-defender-containers@myproject.iam.gserviceaccount.com +NativeCloudConnectionWorkloadIdentityProviderId : containers +OfferingType : DefenderForContainersGcp +PolicyAgentAutoProvisioningFlag : True +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForDatabasesAwsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForDatabasesAwsOfferingObject.md new file mode 100644 index 000000000000..554da8762f42 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForDatabasesAwsOfferingObject.md @@ -0,0 +1,24 @@ +### Example 1: Create new DefenderForDatabasesAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderForDatabasesAwsOfferingObject ` + -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" + +``` + +```output +ArcAutoProvisioningCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-ArcAutoProvisioning +ArcAutoProvisioningEnabled : True +ConfigurationPrivateLinkScope : +ConfigurationProxy : +DatabaseDspmCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DataSecurityPostureDB +DatabaseDspmEnabled : True +Description : +OfferingType : DefenderForDatabasesAws +RdCloudRoleArn : +RdEnabled : +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForDatabasesGcpOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForDatabasesGcpOfferingObject.md new file mode 100644 index 000000000000..a856a2af305d --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForDatabasesGcpOfferingObject.md @@ -0,0 +1,20 @@ +### Example 1: Create new DefenderForDatabasesGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderForDatabasesGcpOfferingObject ` + -ArcAutoProvisioningEnabled $true ` + -DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress "microsoft-databases-arc-ap@" -DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId "defender-for-databases-arc-ap" + +``` + +```output +ArcAutoProvisioningEnabled : True +ConfigurationPrivateLinkScope : +ConfigurationProxy : +DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress : microsoft-databases-arc-ap@ +DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId : defender-for-databases-arc-ap +Description : +OfferingType : DefenderForDatabasesGcp +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForServersAwsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForServersAwsOfferingObject.md new file mode 100644 index 000000000000..1f74745d7067 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForServersAwsOfferingObject.md @@ -0,0 +1,34 @@ +### Example 1: Create new DefenderForServersAwsOffering object +```powershell +$arnPrefix = "arn:aws:iam::123456789012:role" +New-AzSecurityDefenderForServersAwsOfferingObject ` + -DefenderForServerCloudRoleArn "$arnPrefix/DefenderForCloud-DefenderForServers" ` + -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + -MdeAutoProvisioningEnabled $true ` + -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + -VMScannerEnabled $true -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationScanningMode Default ` + -SubPlanType P2 +``` + +```output +ArcAutoProvisioningCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-ArcAutoProvisioning +ArcAutoProvisioningEnabled : True +ConfigurationCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-AgentlessScanner +ConfigurationExclusionTag : { + } +ConfigurationPrivateLinkScope : +ConfigurationProxy : +ConfigurationScanningMode : Default +ConfigurationType : TVM +DefenderForServerCloudRoleArn : arn:aws:iam::123456789012:role/DefenderForCloud-DefenderForServers +Description : +MdeAutoProvisioningConfiguration : { + } +MdeAutoProvisioningEnabled : True +OfferingType : DefenderForServersAws +SubPlanType : P2 +VMScannerEnabled : True +VaAutoProvisioningEnabled : True +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForServersGcpOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForServersGcpOfferingObject.md new file mode 100644 index 000000000000..07810bdabb00 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityDefenderForServersGcpOfferingObject.md @@ -0,0 +1,30 @@ +### Example 1: Create new DefenderForServersGcpOffering object +```powershell +$emailSuffix = "myproject.iam.gserviceaccount.com" +New-AzSecurityDefenderForServersGcpOfferingObject ` + -DefenderForServerServiceAccountEmailAddress "microsoft-defender-for-servers@$emailSuffix" -DefenderForServerWorkloadIdentityProviderId "defender-for-servers" ` + -ArcAutoProvisioningEnabled $true -MdeAutoProvisioningEnabled $true -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + -VMScannerEnabled $true -ConfigurationScanningMode Default ` + -SubPlanType P2 +``` + +```output +ArcAutoProvisioningEnabled : True +ConfigurationExclusionTag : { + } +ConfigurationPrivateLinkScope : +ConfigurationProxy : +ConfigurationScanningMode : Default +ConfigurationType : TVM +DefenderForServerServiceAccountEmailAddress : microsoft-defender-for-servers@myproject.iam.gserviceaccount.com +DefenderForServerWorkloadIdentityProviderId : defender-for-servers +Description : +MdeAutoProvisioningConfiguration : { + } +MdeAutoProvisioningEnabled : True +OfferingType : DefenderForServersGcp +SubPlanType : P2 +VMScannerEnabled : True +VaAutoProvisioningEnabled : True +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityGcpOrganizationalDataMemberObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityGcpOrganizationalDataMemberObject.md new file mode 100644 index 000000000000..5e8ba6075e39 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityGcpOrganizationalDataMemberObject.md @@ -0,0 +1,12 @@ +### Example 1: Create new GcpOrganizationalDataMember object +```powershell +New-AzSecurityGcpOrganizationalDataMemberObject -ManagementProjectNumber "12345" -ParentHierarchyId "00000" +``` + +```output +ManagementProjectNumber OrganizationMembershipType ParentHierarchyId +----------------------- -------------------------- ----------------- +12345 Member 00000 +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityGcpOrganizationalDataOrganizationObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityGcpOrganizationalDataOrganizationObject.md new file mode 100644 index 000000000000..2bfd6340ed94 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityGcpOrganizationalDataOrganizationObject.md @@ -0,0 +1,16 @@ +### Example 1: Create new GcpOrganizationalDataOrganization object +```powershell +New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2) +``` + +```output +ExcludedProjectNumber : {1, 2} +OrganizationMembershipType : Organization +OrganizationName : +ServiceAccountEmailAddress : my@email.com +WorkloadIdentityProviderId : provider +``` + + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityGcpProjectEnvironmentObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityGcpProjectEnvironmentObject.md new file mode 100644 index 000000000000..243a44be826d --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityGcpProjectEnvironmentObject.md @@ -0,0 +1,22 @@ +### Example 1: Create new GcpOrganizationalDataOrganization object +```powershell +$orgData = New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2) +New-AzSecurityGcpProjectEnvironmentObject -ProjectDetailProjectId "asc-sdk-samples" -ScanInterval 24 -OrganizationalData $orgData -ProjectDetailProjectNumber "1234" +``` + +```output +EnvironmentType : GcpProject +OrganizationalData : { + "organizationMembershipType": "Organization", + "excludedProjectNumbers": [ "1", "2" ], + "serviceAccountEmailAddress": "my@email.com", + "workloadIdentityProviderId": "provider" + } +ProjectDetailProjectId : asc-sdk-samples +ProjectDetailProjectName : +ProjectDetailProjectNumber : 1234 +ProjectDetailWorkloadIdentityPoolId : +ScanInterval : 24 +``` + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityGitHubScopeEnvironmentObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityGitHubScopeEnvironmentObject.md new file mode 100644 index 000000000000..4908c2465ad4 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityGitHubScopeEnvironmentObject.md @@ -0,0 +1,13 @@ +### Example 1: Create new GitHubScopeEnvironment object +```powershell +New-AzSecurityGitHubScopeEnvironmentObject +``` + +```output +EnvironmentType +--------------- +GithubScope +``` + + + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityGitLabScopeEnvironmentObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityGitLabScopeEnvironmentObject.md new file mode 100644 index 000000000000..cffd06b19c8c --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityGitLabScopeEnvironmentObject.md @@ -0,0 +1,11 @@ +### Example 1: Create new GitLabScopeEnvironment object +```powershell +New-AzSecurityGitLabScopeEnvironmentObject +``` + +```output +EnvironmentType +--------------- +GitlabScope +``` + diff --git a/src/Security/Security.Autorest/examples/New-AzSecurityInformationProtectionAwsOfferingObject.md b/src/Security/Security.Autorest/examples/New-AzSecurityInformationProtectionAwsOfferingObject.md new file mode 100644 index 000000000000..a5388db97142 --- /dev/null +++ b/src/Security/Security.Autorest/examples/New-AzSecurityInformationProtectionAwsOfferingObject.md @@ -0,0 +1,11 @@ +### Example 1: Create new InformationProtectionAwsOffering object +```powershell +New-AzSecurityInformationProtectionAwsOfferingObject -InformationProtectionCloudRoleArn "arn:aws:iam::123456789012:role/myRole" +``` + +```output +Description InformationProtectionCloudRoleArn OfferingType +----------- --------------------------------- ------------ + arn:aws:iam::123456789012:role/myRole InformationProtectionAws +``` + diff --git a/src/Security/Security.Autorest/examples/Remove-AzSecurityConnector.md b/src/Security/Security.Autorest/examples/Remove-AzSecurityConnector.md new file mode 100644 index 000000000000..115ae8a102e8 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Remove-AzSecurityConnector.md @@ -0,0 +1,6 @@ +### Example 1: Remove security connector +```powershell +Remove-AzSecurityConnector -ResourceGroupName "securityconnectors-pwsh-tmp" -Name "ado-sdk-pwsh-test03" +``` + + diff --git a/src/Security/Security.Autorest/examples/Remove-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/examples/Remove-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..92432a984362 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Remove-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,5 @@ +### Example 1: Remove DevOps Configuration for the security connector +```powershell +Remove-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName "securityconnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" +``` + diff --git a/src/Security/Security.Autorest/examples/Update-AzSecurityConnector.md b/src/Security/Security.Autorest/examples/Update-AzSecurityConnector.md new file mode 100644 index 000000000000..0f7f0acb872d --- /dev/null +++ b/src/Security/Security.Autorest/examples/Update-AzSecurityConnector.md @@ -0,0 +1,33 @@ +### Example 1: Update security connector +```powershell +Update-AzSecurityConnector -ResourceGroupName "securityConnectors-pwsh-tmp" -Name "ado-sdk-pwsh-test03" -Tag @{myTag="v1"} +``` + +```output +EnvironmentData : { + "environmentType": "AzureDevOpsScope" + } +EnvironmentName : AzureDevOps +Etag : +HierarchyIdentifier : 9dd01e19-8aaf-43a2-8dd4-1c5992f4df35 +HierarchyIdentifierTrialEndDate : +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03 +Kind : +Location : CentralUS +Name : ado-sdk-pwsh-test03 +Offering : {{ + "offeringType": "CspmMonitorAzureDevOps" + }} +ResourceGroupName : securityconnectors-pwsh-tmp +SystemDataCreatedAt : 2/24/2024 12:13:11 AM +SystemDataCreatedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 2/24/2024 12:24:02 AM +SystemDataLastModifiedBy : c3d82ccb-fee1-430c-949e-6c0a217c00a8 +SystemDataLastModifiedByType : Application +Tag : { + "myTag": "v1" + } +Type : Microsoft.Security/securityconnectors +``` + diff --git a/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsOrg.md b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsOrg.md new file mode 100644 index 000000000000..42db0a7eebc5 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsOrg.md @@ -0,0 +1,39 @@ +### Example 1: Update discovered AzureDevOps organization configuration +```powershell +$config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) +Update-AzSecurityConnectorAzureDevOpsOrg -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -OrgName "org1" -ActionableRemediation $config +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "High", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default/azureDevOpsOrgs/org1 +Name : org1 +OnboardingState : Onboarded +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/24/2024 12:28:16 AM +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs +``` + + + diff --git a/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsProject.md b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsProject.md new file mode 100644 index 000000000000..87c9cb57c427 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsProject.md @@ -0,0 +1,42 @@ +### Example 1: Update discovered AzureDevOps project configuration +```powershell +$config = New-AzSecurityConnectorActionableRemediationObject -State Disabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="Low"}) +Update-AzSecurityConnectorAzureDevOpsProject -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -OrgName "org1" -ProjectName "Build" -ActionableRemediation $config +``` + +```output +ActionableRemediation : { + "state": "Disabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "Low", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default/azureDevOpsOrgs/org1/p + rojects/Build +Name : Build +OnboardingState : Onboarded +ParentOrgName : org1 +ProjectId : 68b6a6ae-a3e4-41fa-b16e-bc4bbacd139a +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/24/2024 12:31:18 AM +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects +``` + + + diff --git a/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsRepo.md b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsRepo.md new file mode 100644 index 000000000000..7defe2e75941 --- /dev/null +++ b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorAzureDevOpsRepo.md @@ -0,0 +1,44 @@ +### Example 1: Update discovered AzureDevOps repository configuration +```powershell +$config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="Low"} ) +Update-AzSecurityConnectorAzureDevOpsRepo -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -OrgName "org1" -ProjectName "Build" -RepoName "Build" -ActionableRemediation $config +``` + +```output +ActionableRemediation : { + "state": "Enabled", + "categoryConfigurations": [ + { + "minimumSeverityLevel": "Low", + "category": "IaC" + } + ], + "branchConfiguration": { + "branchNames": [ ], + "annotateDefaultBranch": "Enabled" + }, + "inheritFromParentState": "Disabled" + } +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default/azureDevOpsOrgs/org1/p + rojects/Build/repos/Build +Name : Build +OnboardingState : Onboarded +ParentOrgName : org1 +ParentProjectName : Build +ProvisioningState : Succeeded +ProvisioningStatusMessage : OK +ProvisioningStatusUpdateTimeUtc : 2/24/2024 12:31:19 AM +RepoId : 64d6ea8c-6030-44db-86a4-044f13a7f43e +RepoUrl : https://dev.azure.com/org1/Build/_git/Build +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos +Visibility : +``` + + diff --git a/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorDevOpsConfiguration.md b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorDevOpsConfiguration.md new file mode 100644 index 000000000000..1c38eebc05ff --- /dev/null +++ b/src/Security/Security.Autorest/examples/Update-AzSecurityConnectorDevOpsConfiguration.md @@ -0,0 +1,25 @@ +### Example 1: Update DevOps configuration +```powershell +Update-AzSecurityConnectorDevOpsConfiguration -ResourceGroupName "securityConnectors-pwsh-tmp" -SecurityConnectorName "ado-sdk-pwsh-test03" -AutoDiscovery Enabled +``` + +```output +AuthorizationCode : +AutoDiscovery : Enabled +Id : /subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test03/devops/default +Name : default +ProvisioningState : Succeeded +ProvisioningStatusMessage : Resource creation successful. +ProvisioningStatusUpdateTimeUtc : +ResourceGroupName : securityConnectors-pwsh-tmp +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TopLevelInventoryList : +Type : Microsoft.Security/securityConnectors/devops +``` + + diff --git a/src/Security/Security.Autorest/how-to.md b/src/Security/Security.Autorest/how-to.md new file mode 100644 index 000000000000..56e8a9194bc8 --- /dev/null +++ b/src/Security/Security.Autorest/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.Security`. + +## Building `Az.Security` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.Security` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.Security` +To pack `Az.Security` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.Security`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.Security.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.Security.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.Security`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.Security` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/Security/Security.Autorest/license.txt b/src/Security/Security.Autorest/license.txt new file mode 100644 index 000000000000..b9f3180fb9af --- /dev/null +++ b/src/Security/Security.Autorest/license.txt @@ -0,0 +1,227 @@ +MICROSOFT SOFTWARE LICENSE TERMS + +MICROSOFT AZURE POWERSHELL + +These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. + +BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. + + +-----------------START OF LICENSE-------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +-------------------END OF LICENSE------------------------------------------ + + +----------------START OF THIRD PARTY NOTICE-------------------------------- + + +The software includes the AutoMapper library ("AutoMapper"). The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Provided for Informational Purposes Only + +AutoMapper + +The MIT License (MIT) +Copyright (c) 2010 Jimmy Bogard + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + + + +*************** + +The software includes Newtonsoft.Json. The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Newtonsoft.Json + +The MIT License (MIT) +Copyright (c) 2007 James Newton-King +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------END OF THIRD PARTY NOTICE---------------------------------------- + diff --git a/src/Security/Security.Autorest/resources/README.md b/src/Security/Security.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/src/Security/Security.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityApiCollection.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityApiCollection.Recording.json new file mode 100644 index 000000000000..89682913dc1b --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityApiCollection.Recording.json @@ -0,0 +1,222 @@ +{ + "Get-AzSecurityApiCollection+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.Security/apiCollections?api-version=2023-11-15+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.Security/apiCollections?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "7d0031e5-ed48-4233-a623-bd767782aad7" ], + "CommandName": [ "Get-AzSecurityApiCollection" ], + "FullCommandName": [ "Get-AzSecurityApiCollection_List1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "03254352-061e-4931-b16c-4a063caeb8cd" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "fb5b0b9e-8f77-47a3-a9b7-8d9047781e52" ], + "traceparent": [ "00-ebdd1d6618ffbedebc6b040c94281175-7bc85025f8be91c1-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "03254352-061e-4931-b16c-4a063caeb8cd" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020818Z:03254352-061e-4931-b16c-4a063caeb8cd" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5393709516744ADA9CB9DAC31E2A45D8 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:16Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "752" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api\",\"name\":\"echo-api\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net/echo\",\"numberOfApiEndpoints\":6,\"numberOfInactiveApiEndpoints\":6,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityApiCollection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "980b76a5-9554-4911-8b7f-18e069160b07" ], + "CommandName": [ "Get-AzSecurityApiCollection" ], + "FullCommandName": [ "Get-AzSecurityApiCollection_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "f91b02c5-2107-43bb-a814-30d6793eab0f" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "11a79bf9-4e15-47b8-af4d-c221f3a3f8f9" ], + "traceparent": [ "00-577a658b2f9d113fdc086368c4a6f55a-6ff23f8c2c0a6491-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "f91b02c5-2107-43bb-a814-30d6793eab0f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020819Z:f91b02c5-2107-43bb-a814-30d6793eab0f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4B891016BCA844E482912D9AB545D4DA Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:18Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "740" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api\",\"name\":\"echo-api\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net/echo\",\"numberOfApiEndpoints\":6,\"numberOfInactiveApiEndpoints\":6,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}", + "isContentBase64": false + } + }, + "Get-AzSecurityApiCollection+[NoContext]+ListBySubscription+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/providers/Microsoft.Security/apiCollections?api-version=2023-11-15+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/providers/Microsoft.Security/apiCollections?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "9c81a86f-526f-41e3-8f11-473732e62ce6" ], + "CommandName": [ "Get-AzSecurityApiCollection" ], + "FullCommandName": [ "Get-AzSecurityApiCollection_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "f256739c-f25e-431f-b8a5-988982ca1296" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "9f1d750c-df89-43b5-a307-8120d285da4d" ], + "traceparent": [ "00-bc96983a21988c003131f593e0e9054e-52454530adf8fe97-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "f256739c-f25e-431f-b8a5-988982ca1296" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020820Z:f256739c-f25e-431f-b8a5-988982ca1296" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 71C2BD2631C74A60962347F3D2026799 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:19Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "752" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api\",\"name\":\"echo-api\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net/echo\",\"numberOfApiEndpoints\":6,\"numberOfInactiveApiEndpoints\":6,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityApiCollection+[NoContext]+ListByService+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections?api-version=2023-11-15+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "b824a0c6-a3c1-411f-9cfa-0fd538ecf4c3" ], + "CommandName": [ "Get-AzSecurityApiCollection" ], + "FullCommandName": [ "Get-AzSecurityApiCollection_List2" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "df0fe716-990c-45a0-9cc4-40a691efdf09" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "mise-correlation-id": [ "cac08564-154c-4912-97d9-da3ea38b5a95" ], + "traceparent": [ "00-b5142d373081f9e285b25474e7e1afd8-bf4a6d0d5c65b25c-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "df0fe716-990c-45a0-9cc4-40a691efdf09" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020821Z:df0fe716-990c-45a0-9cc4-40a691efdf09" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A19F57D31C3846CEA0D623212129A8A0 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:20Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "752" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api\",\"name\":\"echo-api\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net/echo\",\"numberOfApiEndpoints\":6,\"numberOfInactiveApiEndpoints\":6,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityApiCollection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "46c088f4-73b4-4bf1-9a55-b3d8607178a4" ], + "CommandName": [ "Get-AzSecurityApiCollection" ], + "FullCommandName": [ "Get-AzSecurityApiCollection_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "16ab7340-0015-4e20-af12-3baa72ec7b50" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "40bc3ecf-f869-4938-9f39-93674f2ff11a" ], + "traceparent": [ "00-edf093f2f76cea14bcb9821b01731ba4-1028c0b8ec42a4db-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "16ab7340-0015-4e20-af12-3baa72ec7b50" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020823Z:16ab7340-0015-4e20-af12-3baa72ec7b50" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D5203F3EE65B46358CC4432F144AB94E Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:21Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "740" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api\",\"name\":\"echo-api\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net/echo\",\"numberOfApiEndpoints\":6,\"numberOfInactiveApiEndpoints\":6,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityApiCollection.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityApiCollection.Tests.ps1 new file mode 100644 index 000000000000..93d569175f92 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityApiCollection.Tests.ps1 @@ -0,0 +1,50 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityApiCollection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityApiCollection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityApiCollection' { + It 'List' { + $rg = $env.ApiCollectionsResourceGroupName + $collections = Get-AzSecurityApiCollection -ResourceGroupName $rg + $collections.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.ApiCollectionsResourceGroupName + $collection = Get-AzSecurityApiCollection -ResourceGroup $rg -ServiceName "demoapimservice2" -ApiId "echo-api" + $collection | Should -Not -Be $null + $collection.Name.Contains('echo-api') | Should -Be $true + } + + It 'ListBySubscription' { + $collections = Get-AzSecurityApiCollection + $collections.Count | Should -BeGreaterThan 0 + } + + It 'ListByService' { + $rg = $env.ApiCollectionsResourceGroupName + $collections = Get-AzSecurityApiCollection -ResourceGroup $rg -ServiceName "demoapimservice2" + $collections.Count | Should -BeGreaterThan 0 + } + + It 'GetViaIdentity' { + $rg = $env.ApiCollectionsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourceGroups/$rg/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api" } + $collection = Get-AzSecurityApiCollection -InputObject $InputObject + $collection.Count | Should -Be 1 + $collection.Name.Contains('echo-api') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnector.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnector.Recording.json new file mode 100644 index 000000000000..5ff7d540825b --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnector.Recording.json @@ -0,0 +1,174 @@ +{ + "Get-AzSecurityConnector+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "f43a131c-9b98-462d-b4e4-089bd01a6169" ], + "CommandName": [ "Get-AzSecurityConnector" ], + "FullCommandName": [ "Get-AzSecurityConnector_List1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "99" ], + "x-ms-request-id": [ "76073450-227e-4632-be4d-8c59c2c9a5f8" ], + "x-ms-correlation-request-id": [ "76073450-227e-4632-be4d-8c59c2c9a5f8" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020825Z:76073450-227e-4632-be4d-8c59c2c9a5f8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AB597D11544E4C7D80A8E89DDA20D79A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:24Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2420" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest2\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-13T23:45:37.7516486Z\"}},{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGitLab\"}],\"environmentName\":\"GitLab\",\"hierarchyIdentifier\":\"7a1f4efe-f8c6-48e7-b7ef-1b45994ed602\",\"environmentData\":{\"environmentType\":\"GitlabScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01\",\"name\":\"dfdsdktests-gl-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-11T18:52:24.9825323Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2023-12-11T19:22:09.7886218Z\"}},{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGithub\"}],\"environmentName\":\"Github\",\"hierarchyIdentifier\":\"bc12ba4d-b89c-486e-85e1-d803e7d80525\",\"environmentData\":{\"environmentType\":\"GithubScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01\",\"name\":\"dfdsdktests-gh-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-11T19:31:38.6578077Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2023-12-11T19:31:38.6578077Z\"}}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnector+[NoContext]+ListBySubscription+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/providers/Microsoft.Security/securityConnectors?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/providers/Microsoft.Security/securityConnectors?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "7e512064-64c9-4e6a-8a48-08a571dc88ae" ], + "CommandName": [ "Get-AzSecurityConnector" ], + "FullCommandName": [ "Get-AzSecurityConnector_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "99" ], + "x-ms-request-id": [ "1d6f817b-29bc-46fd-b964-b063f14bead0" ], + "x-ms-correlation-request-id": [ "1d6f817b-29bc-46fd-b964-b063f14bead0" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020825Z:1d6f817b-29bc-46fd-b964-b063f14bead0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2E6106F412584E14BD91FBD9110D8B55 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:25Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3363" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest2\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-13T23:45:37.7516486Z\"}},{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGitLab\"}],\"environmentName\":\"GitLab\",\"hierarchyIdentifier\":\"7a1f4efe-f8c6-48e7-b7ef-1b45994ed602\",\"environmentData\":{\"environmentType\":\"GitlabScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01\",\"name\":\"dfdsdktests-gl-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-11T18:52:24.9825323Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2023-12-11T19:22:09.7886218Z\"}},{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGithub\"}],\"environmentName\":\"Github\",\"hierarchyIdentifier\":\"bc12ba4d-b89c-486e-85e1-d803e7d80525\",\"environmentData\":{\"environmentType\":\"GithubScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01\",\"name\":\"dfdsdktests-gh-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-11T19:31:38.6578077Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2023-12-11T19:31:38.6578077Z\"}},{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGithub\"}],\"environmentName\":\"Github\",\"hierarchyIdentifier\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-tests/providers/Microsoft.SecurityDevOps/gitHubConnectors/sdk_gh_test\",\"environmentData\":{\"environmentType\":\"GithubScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-tests/providers/Microsoft.Security/securityConnectors/sdk_gh_test\",\"name\":\"sdk_gh_test\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"tagUpdateFromSdk\":\"ff962732-cf68-4379-87a8-53dc08c06071\"},\"systemData\":{\"createdBy\":\"elgrady@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2023-08-27T14:55:53.3654737Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2023-08-27T15:25:33.5982713Z\"}}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnector+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "1db5a8d4-df1f-4f2b-9605-36d63e88cc98" ], + "CommandName": [ "Get-AzSecurityConnector" ], + "FullCommandName": [ "Get-AzSecurityConnector_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "99" ], + "x-ms-request-id": [ "bc81c1c2-bf07-49ec-9610-4eac3773bf33" ], + "x-ms-correlation-request-id": [ "bc81c1c2-bf07-49ec-9610-4eac3773bf33" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020826Z:bc81c1c2-bf07-49ec-9610-4eac3773bf33" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C0F90B78D6144B52A06CBE0AAF0F4F2A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:26Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "832" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest2\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-13T23:45:37.7516486Z\"}}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnector+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "e6290598-2301-4b47-8c7a-38ba9ecbb179" ], + "CommandName": [ "Get-AzSecurityConnector" ], + "FullCommandName": [ "Get-AzSecurityConnector_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "99" ], + "x-ms-request-id": [ "5941b780-3816-4a3e-8828-60ac970c6665" ], + "x-ms-correlation-request-id": [ "5941b780-3816-4a3e-8828-60ac970c6665" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020827Z:5941b780-3816-4a3e-8828-60ac970c6665" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CC09CFD4D12F4B53B20A8A9295BF101A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:27Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "832" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest2\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-13T23:45:37.7516486Z\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnector.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnector.Tests.ps1 new file mode 100644 index 000000000000..a10fb1858e39 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnector.Tests.ps1 @@ -0,0 +1,45 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnector')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnector.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnector' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $connectors = Get-AzSecurityConnector -ResourceGroupName $rg + $connectors.Count | Should -BeGreaterThan 0 + } + + It 'ListBySubscription' { + $connectors = Get-AzSecurityConnector + $connectors.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $connector = Get-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name "dfdsdktests-azdo-01" + $connector | Should -Not -Be $null + $connector.Name.Contains('dfdsdktests-azdo-01') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01" } + $connector = Get-AzSecurityConnector -InputObject $InputObject + $connector.Count | Should -Be 1 + $connector.Name.Contains('dfdsdktests-azdo-01') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrg.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrg.Recording.json new file mode 100644 index 000000000000..cac85345e107 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrg.Recording.json @@ -0,0 +1,143 @@ +{ + "Get-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "776a0918-bf64-4796-8062-1eee4275ad8f" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "20cc6c93-cbe4-4b7b-bb42-61f1e9d55a7b" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "1064b628-fba5-4a18-a8ea-1f78b468f00a" ], + "x-ms-correlation-request-id": [ "1064b628-fba5-4a18-a8ea-1f78b468f00a" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020829Z:1064b628-fba5-4a18-a8ea-1f78b468f00a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DED889D13B854F35835FB3E5FB284245 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:28Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "763f5309-a5a6-44e2-ad3b-12be8f6f35ab" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "142d1c61-12e8-46aa-a425-072e85d8f7f4" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "f67d706c-4d18-47e0-8ae8-9b9ca7b40a27" ], + "x-ms-correlation-request-id": [ "f67d706c-4d18-47e0-8ae8-9b9ca7b40a27" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020829Z:f67d706c-4d18-47e0-8ae8-9b9ca7b40a27" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 31E4C8D153B04809BA5F2F24051ECD22 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:29Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "687" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "0e35f39f-3533-4076-aae4-fed262201caa" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "8d2beff5-6809-44b0-9d0a-88fe5ef949d9" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "9413f92c-7a08-4d0e-a2a7-afb1d3a8915b" ], + "x-ms-correlation-request-id": [ "9413f92c-7a08-4d0e-a2a7-afb1d3a8915b" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020830Z:9413f92c-7a08-4d0e-a2a7-afb1d3a8915b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D55FF7CA6A304457B6C28720DE3E554E Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:30Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "687" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrg.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrg.Tests.ps1 new file mode 100644 index 000000000000..d2dd848ee5ab --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrg.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorAzureDevOpsOrg')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorAzureDevOpsOrg.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorAzureDevOpsOrg' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $orgs = Get-AzSecurityConnectorAzureDevOpsOrg -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" + $orgs.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $org = Get-AzSecurityConnectorAzureDevOpsOrg -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" + $org | Should -Not -Be $null + $org.Name.Contains('dfdsdktests') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests" } + $org = Get-AzSecurityConnectorAzureDevOpsOrg -InputObject $InputObject + $org.Count | Should -Be 1 + $org.Name.Contains('dfdsdktests') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Recording.json new file mode 100644 index 000000000000..cdf4b677593a --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Recording.json @@ -0,0 +1,49 @@ +{ + "Get-AzSecurityConnectorAzureDevOpsOrgAvailable+[NoContext]+List+$POST+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/listAvailableAzureDevOpsOrgs?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/listAvailableAzureDevOpsOrgs?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "e7eedea7-9b07-4739-8daf-8a1816315f9a" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrgAvailable" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrgAvailable_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "ed236c60-094b-407a-b8bc-4f4245efb171" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "22bfb24a-c8a1-4f3b-b80e-975960d5fa1b" ], + "x-ms-correlation-request-id": [ "22bfb24a-c8a1-4f3b-b80e-975960d5fa1b" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020832Z:22bfb24a-c8a1-4f3b-b80e-975960d5fa1b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8E234E82511149A58D720AEC836BF9EF Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:30Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Tests.ps1 new file mode 100644 index 000000000000..0c4149c22591 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorAzureDevOpsOrgAvailable')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorAzureDevOpsOrgAvailable.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorAzureDevOpsOrgAvailable' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $orgs = Get-AzSecurityConnectorAzureDevOpsOrgAvailable -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" + $orgs.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsProject.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsProject.Recording.json new file mode 100644 index 000000000000..cfb103f07c72 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsProject.Recording.json @@ -0,0 +1,143 @@ +{ + "Get-AzSecurityConnectorAzureDevOpsProject+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "d653caa3-a460-401f-8e57-20c63e529982" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "7886f7b4-a957-4e94-9157-2c22153a727c" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "43a50eae-bebe-4910-aa0b-f7ba214d6711" ], + "x-ms-correlation-request-id": [ "43a50eae-bebe-4910-aa0b-f7ba214d6711" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020833Z:43a50eae-bebe-4910-aa0b-f7ba214d6711" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DEA863CCD3F94022A81D4B84C67AB687 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:33Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1625" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"161fb6f6-f2fe-4616-a627-293b788ff583\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"d68aef73-e155-400d-a60f-617fb8b54773\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoEnterprise\",\"name\":\"ContosoEnterprise\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsProject+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "2e0acc90-e3cd-4fa6-9eb9-fe94e884966d" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "4a2df027-c8c8-4361-a30d-01bc750319c8" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "ffc6b6b1-84d3-425e-947a-21d0e31c4213" ], + "x-ms-correlation-request-id": [ "ffc6b6b1-84d3-425e-947a-21d0e31c4213" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020834Z:ffc6b6b1-84d3-425e-947a-21d0e31c4213" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9BCB9D0E5B8D4F2D9830533E9EE5B179 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:33Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"161fb6f6-f2fe-4616-a627-293b788ff583\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsProject+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "dbdb4e2f-346e-4337-9c8e-ed6334f425a4" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "288f672b-80bd-478b-a0e2-bedd810c1267" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "2fefbfc1-d34f-4cd7-9a01-9c2497222be9" ], + "x-ms-correlation-request-id": [ "2fefbfc1-d34f-4cd7-9a01-9c2497222be9" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020835Z:2fefbfc1-d34f-4cd7-9a01-9c2497222be9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B8FCE940576D4A0BA74C0A2D0379D8E4 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:34Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"161fb6f6-f2fe-4616-a627-293b788ff583\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsProject.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsProject.Tests.ps1 new file mode 100644 index 000000000000..6aff01283e05 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsProject.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorAzureDevOpsProject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorAzureDevOpsProject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorAzureDevOpsProject' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $projects = Get-AzSecurityConnectorAzureDevOpsProject -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" + $projects.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $project = Get-AzSecurityConnectorAzureDevOpsProject -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" + $project | Should -Not -Be $null + $project.Name.Contains('ContosoSDKDfd') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd" } + $project = Get-AzSecurityConnectorAzureDevOpsProject -InputObject $InputObject + $project.Count | Should -Be 1 + $project.Name.Contains('ContosoSDKDfd') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsRepo.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsRepo.Recording.json new file mode 100644 index 000000000000..ab3bd08ceeb9 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsRepo.Recording.json @@ -0,0 +1,190 @@ +{ + "Get-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "9558e794-b6e0-4245-ad7e-99a589307e08" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "1fbff945-4344-4882-b3b9-53d8b84c3ddd" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "1ad617b3-5ee4-4517-893a-563144994b22" ], + "x-ms-correlation-request-id": [ "1ad617b3-5ee4-4517-893a-563144994b22" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020836Z:1ad617b3-5ee4-4517-893a-563144994b22" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BDE645F1B6C24AD0B14DAEE42E58248E Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:35Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "9840" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"22a344e3-8ad3-4a97-88a6-768a4e710777\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/ContosoSDKDfd\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"35cd4811-63c7-4043-8587-f0a9cf37709e\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp0\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0\",\"name\":\"TestApp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"77c1e69a-41a5-4de7-8b9c-0acab45f5bca\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp2\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2\",\"name\":\"TestApp2\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"e42d18c5-0cef-4f19-9b09-3e2ab58e9be6\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp5\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp5\",\"name\":\"TestApp5\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"0d2570d8-0dfd-480a-93c4-4b945d4bd240\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp8\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp8\",\"name\":\"TestApp8\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"36b0a509-f1d8-4d7a-82f7-66493fbcc766\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp6\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp6\",\"name\":\"TestApp6\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"cece391b-987e-4418-9091-69c009c076a2\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp1\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp1\",\"name\":\"TestApp1\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"7b15f005-9985-44b3-b6ef-7c1b50400f1f\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp9\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp9\",\"name\":\"TestApp9\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"e6fdca92-f9f8-4d62-a327-840ed4fa6c54\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp4\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp4\",\"name\":\"TestApp4\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"7ae95dbf-2233-454a-930b-9a23039d9af2\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp7\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp7\",\"name\":\"TestApp7\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}],\"nextLink\":\"https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos?api-version=2023-09-01-preview\\u0026continuation-token=eyJPcHRpbWlzdGljRGlyZWN0RXhlY3V0aW9uVG9rZW4iOnsidG9rZW4iOiIrUklEOn42RElDQUxFR1p5aXZTUVFBQUFBQURBPT0jUlQ6MSNUUkM6MTAjSVNWOjIjSUVPOjY1NTY3I1FDRjo4I0ZQQzpBYTlKQkFBQUFBQU1zVWtFQUFBQUFBdz0iLCJyYW5nZSI6eyJtaW4iOiIwNUMxRTVCNUUzNkY4NiIsIm1heCI6IkZGIn19fQ==\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos?api-version=2023-09-01-preview\u0026continuation-token=eyJPcHRpbWlzdGljRGlyZWN0RXhlY3V0aW9uVG9rZW4iOnsidG9rZW4iOiIrUklEOn42RElDQUxFR1p5aXZTUVFBQUFBQURBPT0jUlQ6MSNUUkM6MTAjSVNWOjIjSUVPOjY1NTY3I1FDRjo4I0ZQQzpBYTlKQkFBQUFBQU1zVWtFQUFBQUFBdz0iLCJyYW5nZSI6eyJtaW4iOiIwNUMxRTVCNUUzNkY4NiIsIm1heCI6IkZGIn19fQ==+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos?api-version=2023-09-01-preview\u0026continuation-token=eyJPcHRpbWlzdGljRGlyZWN0RXhlY3V0aW9uVG9rZW4iOnsidG9rZW4iOiIrUklEOn42RElDQUxFR1p5aXZTUVFBQUFBQURBPT0jUlQ6MSNUUkM6MTAjSVNWOjIjSUVPOjY1NTY3I1FDRjo4I0ZQQzpBYTlKQkFBQUFBQU1zVWtFQUFBQUFBdz0iLCJyYW5nZSI6eyJtaW4iOiIwNUMxRTVCNUUzNkY4NiIsIm1heCI6IkZGIn19fQ==", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "9558e794-b6e0-4245-ad7e-99a589307e08" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "b27f6e6b-b7d6-4466-aa84-48797b8c2b28" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "5f49fd83-75aa-44ad-baeb-4a444c354297" ], + "x-ms-correlation-request-id": [ "5f49fd83-75aa-44ad-baeb-4a444c354297" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020837Z:5f49fd83-75aa-44ad-baeb-4a444c354297" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8EDF57E486E3420F8C90623CC06F9586 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:36Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1864" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"c52cd770-0ef6-44c1-8d7f-a631dda6f3d6\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp10\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp10\",\"name\":\"TestApp10\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"},{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"53065519-b543-47e3-941b-d38608f985fa\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp3\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp3\",\"name\":\"TestApp3\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "3223d8d7-87de-4cee-a462-648f52998337" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "db269018-e974-4168-9579-7140d44ba837" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b649ac04-deb1-4c8f-a040-29035fb7ecb2" ], + "x-ms-correlation-request-id": [ "b649ac04-deb1-4c8f-a040-29035fb7ecb2" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020837Z:b649ac04-deb1-4c8f-a040-29035fb7ecb2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DE7C8835191B429B974044F2E25BB777 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:37Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "924" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"35cd4811-63c7-4043-8587-f0a9cf37709e\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp0\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0\",\"name\":\"TestApp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "498be2d4-1043-4996-8b49-c5aef8aa16aa" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "3e730443-a62d-467f-989b-566f227246d9" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "3c473061-a47d-4996-acd5-ec99c7ab4e9b" ], + "x-ms-correlation-request-id": [ "3c473061-a47d-4996-acd5-ec99c7ab4e9b" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020838Z:3c473061-a47d-4996-acd5-ec99c7ab4e9b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 23DFD558EB204ACD918BB7C84157092A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:38Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "924" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"35cd4811-63c7-4043-8587-f0a9cf37709e\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp0\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0\",\"name\":\"TestApp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsRepo.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsRepo.Tests.ps1 new file mode 100644 index 000000000000..8a1089caa682 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorAzureDevOpsRepo.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorAzureDevOpsRepo')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorAzureDevOpsRepo.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorAzureDevOpsRepo' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $repos = Get-AzSecurityConnectorAzureDevOpsRepo -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" + $repos.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $repo = Get-AzSecurityConnectorAzureDevOpsRepo -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" -RepoName "TestApp0" + $repo | Should -Not -Be $null + $repo.Name.Contains('TestApp0') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp0" } + $project = Get-AzSecurityConnectorAzureDevOpsRepo -InputObject $InputObject + $project.Count | Should -Be 1 + $project.Name.Contains('TestApp0') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorDevOpsConfiguration.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorDevOpsConfiguration.Recording.json new file mode 100644 index 000000000000..99a2ab626fad --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorDevOpsConfiguration.Recording.json @@ -0,0 +1,143 @@ +{ + "Get-AzSecurityConnectorDevOpsConfiguration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "786be468-9989-4ec6-97cb-4b2d0ac3fa17" ], + "CommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "d6c15dd8-18cf-49cb-87eb-2ecc6b9e669c" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "0ce78bb5-382d-4b3d-8e4d-b336c49275e2" ], + "x-ms-correlation-request-id": [ "0ce78bb5-382d-4b3d-8e4d-b336c49275e2" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020839Z:0ce78bb5-382d-4b3d-8e4d-b336c49275e2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FCC7FAE5694B4D748E166E15319F8548 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:38Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "408" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"centralus\",\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"provisioningStatusMessage\":\"Resource creation successful.\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorDevOpsConfiguration+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "4e79af91-9539-40ec-b628-41732bbabf92" ], + "CommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "adcb04de-5670-4a01-9001-5cd2e9b66ee6" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "0afe3dce-1959-418b-bcc6-723af2ee3275" ], + "x-ms-correlation-request-id": [ "0afe3dce-1959-418b-bcc6-723af2ee3275" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020839Z:0afe3dce-1959-418b-bcc6-723af2ee3275" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AAC45D14196744FA8E19DA847155887A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:39Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "408" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"centralus\",\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"provisioningStatusMessage\":\"Resource creation successful.\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorDevOpsConfiguration+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "1d2e7b2e-a616-40c4-89b9-5e0d2a92492d" ], + "CommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "e2413a97-70b0-4201-a6ec-febe6753945e" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "ed2008e5-327d-4c73-a7f1-232debe43399" ], + "x-ms-correlation-request-id": [ "ed2008e5-327d-4c73-a7f1-232debe43399" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020840Z:ed2008e5-327d-4c73-a7f1-232debe43399" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6E97898179F44FA68F2115743983816D Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:40Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "408" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"centralus\",\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"provisioningStatusMessage\":\"Resource creation successful.\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 new file mode 100644 index 000000000000..7a2a8b0cd5b2 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 @@ -0,0 +1,40 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorDevOpsConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorDevOpsConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorDevOpsConfiguration' { + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $config = Get-AzSecurityConnectorDevOpsConfiguration -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" + $config.Count | Should -Be 1 + } + + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $configs = Get-AzSecurityConnectorDevOpsConfiguration -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" + $configs.Count | Should -Be 1 + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default" } + $config = Get-AzSecurityConnectorDevOpsConfiguration -InputObject $InputObject + $config.Count | Should -Be 1 + $config.Name.Contains('default') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwner.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwner.Recording.json new file mode 100644 index 000000000000..549788a92dc5 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwner.Recording.json @@ -0,0 +1,143 @@ +{ + "Get-AzSecurityConnectorGitHubOwner+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "1605b0bb-3ae8-4959-8c29-bdfa840a2349" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubOwner" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubOwner_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "df48bf02-bd4b-4319-9c42-5438bdb20655" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "5f8d2462-a6a4-49e5-9dfc-ab2e244cc215" ], + "x-ms-correlation-request-id": [ "5f8d2462-a6a4-49e5-9dfc-ab2e244cc215" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020841Z:5f8d2462-a6a4-49e5-9dfc-ab2e244cc215" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D7334E88A666404289230B7B1E21DB5B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:40Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "573" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"ownerUrl\":\"https://github.com/dfdsdktests\",\"gitHubInternalId\":\"45003365\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Beginning provisioning of GitHub connector.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\",\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitHubOwner+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "6e8580a6-5f91-4f6e-82d4-9c89bcb4e450" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubOwner" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubOwner_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "23c6cb43-b8fc-4e31-ab7e-83470f7a0ad2" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "d60acabf-2cfc-4ec4-958c-33bc7c1911af" ], + "x-ms-correlation-request-id": [ "d60acabf-2cfc-4ec4-958c-33bc7c1911af" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020841Z:d60acabf-2cfc-4ec4-958c-33bc7c1911af" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0AFF8CED07D14154A5FDBD716F3AE93B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:41Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "561" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"ownerUrl\":\"https://github.com/dfdsdktests\",\"gitHubInternalId\":\"45003365\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Beginning provisioning of GitHub connector.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\",\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitHubOwner+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "dc5dc0f1-c845-4a37-a638-f47a7979c278" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubOwner" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubOwner_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "6794c628-3114-4b9b-aad6-21e2d72114d2" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "ea6ac78d-856e-41ac-92eb-ac0ee0c4e33c" ], + "x-ms-correlation-request-id": [ "ea6ac78d-856e-41ac-92eb-ac0ee0c4e33c" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020842Z:ea6ac78d-856e-41ac-92eb-ac0ee0c4e33c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 72C71A62CD3F4D419AB28C0979C9FB83 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:41Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "561" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"ownerUrl\":\"https://github.com/dfdsdktests\",\"gitHubInternalId\":\"45003365\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Beginning provisioning of GitHub connector.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\",\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwner.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwner.Tests.ps1 new file mode 100644 index 000000000000..5b207d49a499 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwner.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitHubOwner')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitHubOwner.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitHubOwner' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $owners = Get-AzSecurityConnectorGitHubOwner -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gh-01" + $owners.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $owner = Get-AzSecurityConnectorGitHubOwner -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gh-01" -OwnerName "dfdsdktests" + $owner | Should -Not -Be $null + $owner.Name.Contains('dfdsdktests') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/githubOwners/dfdsdktests" } + $owner = Get-AzSecurityConnectorGitHubOwner -InputObject $InputObject + $owner.Count | Should -Be 1 + $owner.Name.Contains('dfdsdktests') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwnerAvailable.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwnerAvailable.Recording.json new file mode 100644 index 000000000000..a87d819e754e --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwnerAvailable.Recording.json @@ -0,0 +1,49 @@ +{ + "Get-AzSecurityConnectorGitHubOwnerAvailable+[NoContext]+List+$POST+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/listAvailableGitHubOwners?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/listAvailableGitHubOwners?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "bb013683-1db2-4598-b02d-9f613acfa976" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubOwnerAvailable" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubOwnerAvailable_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "372c1421-7e8c-4697-93c3-4233845f6130" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "060e30fb-6fbb-4620-abe3-98bf1bfc62fb" ], + "x-ms-correlation-request-id": [ "060e30fb-6fbb-4620-abe3-98bf1bfc62fb" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020845Z:060e30fb-6fbb-4620-abe3-98bf1bfc62fb" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F6C2469A5C3E412CA7E1973A9F556389 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:43Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "573" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"ownerUrl\":\"https://github.com/dfdsdktests\",\"gitHubInternalId\":\"45003365\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Beginning provisioning of GitHub connector.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\",\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwnerAvailable.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwnerAvailable.Tests.ps1 new file mode 100644 index 000000000000..a73f798d30d3 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubOwnerAvailable.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitHubOwnerAvailable')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitHubOwnerAvailable.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitHubOwnerAvailable' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $owners = Get-AzSecurityConnectorGitHubOwnerAvailable -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gh-01" + $owners.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubRepo.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubRepo.Recording.json new file mode 100644 index 000000000000..3751dc33f076 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubRepo.Recording.json @@ -0,0 +1,143 @@ +{ + "Get-AzSecurityConnectorGitHubRepo+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "b066c6a2-4127-409a-8535-12ef197d7d2e" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubRepo_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "3cf6587e-ee6c-4b40-9901-8715a016f4a5" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "dd17ff24-43ba-4a85-af3e-ee570419e0da" ], + "x-ms-correlation-request-id": [ "dd17ff24-43ba-4a85-af3e-ee570419e0da" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020845Z:dd17ff24-43ba-4a85-af3e-ee570419e0da" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0397E2F5BE364499B47BF69A8E8A4181 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:45Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "6367" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"repoId\":\"728418798\",\"repoName\":\"TestApp0\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp0\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0\",\"name\":\"TestApp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730346643\",\"repoName\":\"TestApp1\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp1\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp1\",\"name\":\"TestApp1\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347967\",\"repoName\":\"TestApp10\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp10\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp10\",\"name\":\"TestApp10\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730348015\",\"repoName\":\"TestApp11\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp11\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp11\",\"name\":\"TestApp11\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347309\",\"repoName\":\"TestApp2\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp2\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp2\",\"name\":\"TestApp2\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347403\",\"repoName\":\"TestApp3\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp3\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp3\",\"name\":\"TestApp3\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347478\",\"repoName\":\"TestApp4\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp4\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp4\",\"name\":\"TestApp4\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347536\",\"repoName\":\"TestApp5\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp5\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:49Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp5\",\"name\":\"TestApp5\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347657\",\"repoName\":\"TestApp6\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp6\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:49Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp6\",\"name\":\"TestApp6\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347732\",\"repoName\":\"TestApp7\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp7\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:49Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp7\",\"name\":\"TestApp7\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347823\",\"repoName\":\"TestApp8\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp8\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:49Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp8\",\"name\":\"TestApp8\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"},{\"properties\":{\"repoId\":\"730347901\",\"repoName\":\"TestApp9\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp9\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:49Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp9\",\"name\":\"TestApp9\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitHubRepo+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "b45daeeb-68c1-4b7c-bba2-b357b707aa25" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubRepo_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "411d430d-34b7-46c9-ac52-4c93b652af66" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "0b23c86a-a491-42d4-8e6a-3e214c6b29c0" ], + "x-ms-correlation-request-id": [ "0b23c86a-a491-42d4-8e6a-3e214c6b29c0" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020846Z:0b23c86a-a491-42d4-8e6a-3e214c6b29c0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 39FD4A5897EF449DA82376FCD4C8BFD4 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:46Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "528" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"repoId\":\"728418798\",\"repoName\":\"TestApp0\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp0\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0\",\"name\":\"TestApp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitHubRepo+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "ce2facb8-29c7-4ec0-bce6-165a9084c455" ], + "CommandName": [ "Get-AzSecurityConnectorGitHubRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitHubRepo_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "cc274ced-0b47-4a90-a76f-883a6d4d2fbb" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "31d39d48-b03d-4418-9d05-4248b9a30552" ], + "x-ms-correlation-request-id": [ "31d39d48-b03d-4418-9d05-4248b9a30552" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020846Z:31d39d48-b03d-4418-9d05-4248b9a30552" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B7444B4C2DF54EB985A25E8F0000BCC9 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:46Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "528" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"repoId\":\"728418798\",\"repoName\":\"TestApp0\",\"onboardingState\":\"Onboarded\",\"repoUrl\":\"https://github.com/dfdsdktests/TestApp0\",\"parentOwnerName\":\"dfdsdktests\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:45:48Z\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/gitHubOwners/dfdsdktests/repos/TestApp0\",\"name\":\"TestApp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitHubOwners/repos\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubRepo.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubRepo.Tests.ps1 new file mode 100644 index 000000000000..96668c000bfa --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitHubRepo.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitHubRepo')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitHubRepo.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitHubRepo' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $repos = Get-AzSecurityConnectorGitHubRepo -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gh-01" -OwnerName "dfdsdktests" + $repos.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $repo = Get-AzSecurityConnectorGitHubRepo -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gh-01" -OwnerName "dfdsdktests" -RepoName "TestApp0" + $repo | Should -Not -Be $null + $repo.Name.Contains('TestApp0') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-gh-01/devops/default/githubOwners/dfdsdktests/repos/TestApp0" } + $repo = Get-AzSecurityConnectorGitHubRepo -InputObject $InputObject + $repo.Count | Should -Be 1 + $repo.Name.Contains('TestApp0') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroup.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroup.Recording.json new file mode 100644 index 000000000000..d07de9cd0189 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroup.Recording.json @@ -0,0 +1,143 @@ +{ + "Get-AzSecurityConnectorGitLabGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "ff17cbf3-7470-4826-a50c-cb68ab93a1f2" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabGroup" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabGroup_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "4af8bad2-165b-4ac6-a6b2-f1f759f222b7" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "914ec50d-0a01-4c7c-b618-8ecfd72f9d63" ], + "x-ms-correlation-request-id": [ "914ec50d-0a01-4c7c-b618-8ecfd72f9d63" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020847Z:914ec50d-0a01-4c7c-b618-8ecfd72f9d63" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 58A68C9254B345658988AC4B46A2BCEA Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:47Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "633" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests\",\"url\":\"https://gitlab.com/groups/dfdsdktests\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-13T22:41:56Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitLabGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "a3974ce8-88e2-444b-83da-40b597d1b2c1" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabGroup" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabGroup_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "24d02427-61eb-4804-8f05-ce933bd746d1" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "357f8740-b159-4de4-b0fa-765feef6c9d8" ], + "x-ms-correlation-request-id": [ "357f8740-b159-4de4-b0fa-765feef6c9d8" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020848Z:357f8740-b159-4de4-b0fa-765feef6c9d8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0CD5D80694DF48D3BA2407EFBF06D136 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:47Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "621" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests\",\"url\":\"https://gitlab.com/groups/dfdsdktests\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-13T22:41:56Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitLabGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "73bd0c71-455d-47cb-b449-5f7a42ff0c63" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabGroup" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabGroup_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "e8ea92b2-8679-4215-8151-43be4c0799e8" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "e56352e8-c8d1-4d8c-8331-521db9f89089" ], + "x-ms-correlation-request-id": [ "e56352e8-c8d1-4d8c-8331-521db9f89089" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020854Z:e56352e8-c8d1-4d8c-8331-521db9f89089" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 05D7C9CF23554F68ACC358492E86FEC6 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:49Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "621" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests\",\"url\":\"https://gitlab.com/groups/dfdsdktests\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-13T22:41:56Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroup.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroup.Tests.ps1 new file mode 100644 index 000000000000..b2a2989321d2 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroup.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitLabGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitLabGroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitLabGroup' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $groups = Get-AzSecurityConnectorGitLabGroup -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gl-01" + $groups.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $group = Get-AzSecurityConnectorGitLabGroup -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gl-01" -GroupFqName "dfdsdktests" + $group | Should -Not -Be $null + $group.Name.Contains('dfdsdktests') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitlabgroups/dfdsdktests" } + $group = Get-AzSecurityConnectorGitLabGroup -InputObject $InputObject + $group.Count | Should -Be 1 + $group.Name.Contains('dfdsdktests') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroupAvailable.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroupAvailable.Recording.json new file mode 100644 index 000000000000..6316d2b1bb10 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroupAvailable.Recording.json @@ -0,0 +1,49 @@ +{ + "Get-AzSecurityConnectorGitLabGroupAvailable+[NoContext]+List+$POST+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/listAvailableGitLabGroups?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/listAvailableGitLabGroups?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "ffc0acf9-7bde-460f-b3f2-64cdfc5d6b8d" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabGroupAvailable" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabGroupAvailable_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "751ce8d5-f4c0-4c2f-97e1-fe9c4abc4728" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "cb7ad2e3-4d8c-4818-b004-489ca5325f56" ], + "x-ms-correlation-request-id": [ "cb7ad2e3-4d8c-4818-b004-489ca5325f56" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020856Z:cb7ad2e3-4d8c-4818-b004-489ca5325f56" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FA6E36051B514B579DD87B1FA7C95D71 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:55Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "633" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests\",\"url\":\"https://gitlab.com/groups/dfdsdktests\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-13T22:41:56Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroupAvailable.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroupAvailable.Tests.ps1 new file mode 100644 index 000000000000..8ed1797be799 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabGroupAvailable.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitLabGroupAvailable')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitLabGroupAvailable.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitLabGroupAvailable' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $groups = Get-AzSecurityConnectorGitLabGroupAvailable -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gl-01" + $groups.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabProject.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabProject.Recording.json new file mode 100644 index 000000000000..500fa426661c --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabProject.Recording.json @@ -0,0 +1,190 @@ +{ + "Get-AzSecurityConnectorGitLabProject+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "a29940e4-8bf1-4bef-ade6-37ce73bf8121" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabProject_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "32b7bbe6-aea4-437f-918d-913b1d470ce1" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b8676673-79e1-4cdf-9a99-ce698f91342a" ], + "x-ms-correlation-request-id": [ "b8676673-79e1-4cdf-9a99-ce698f91342a" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020858Z:b8676673-79e1-4cdf-9a99-ce698f91342a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 87D3D777C6D749F297C41B21762A5DD8 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:57Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7700" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp10\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp10\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp10\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp10\",\"name\":\"testapp10\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp11\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp11\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp11\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp11\",\"name\":\"testapp11\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp0\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp0\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp0\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0\",\"name\":\"testapp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp9\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp9\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp9\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp9\",\"name\":\"testapp9\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp8\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp8\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp8\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp8\",\"name\":\"testapp8\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp6\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp6\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp6\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp6\",\"name\":\"testapp6\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp7\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp7\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp7\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp7\",\"name\":\"testapp7\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp5\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp5\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp5\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp5\",\"name\":\"testapp5\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp4\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp4\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp4\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp4\",\"name\":\"testapp4\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp3\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp3\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp3\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp3\",\"name\":\"testapp3\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"}],\"nextLink\":\"https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects?api-version=2023-09-01-preview\\u0026continuation-token=eyJPcHRpbWlzdGljRGlyZWN0RXhlY3V0aW9uVG9rZW4iOnsidG9rZW4iOiIrUklEOn42RElDQUxFR1p5alNnQVFBQUFBQURBPT0jUlQ6MSNUUkM6MTAjSVNWOjIjSUVPOjY1NTY3I1FDRjo4I0ZQQzpBZEtBQkFBQUFBQU0xSUFFQUFBQUFBdz0iLCJyYW5nZSI6eyJtaW4iOiIwNUMxRTVCNUUzNkY4NiIsIm1heCI6IkZGIn19fQ==\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitLabProject+[NoContext]+List+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects?api-version=2023-09-01-preview\u0026continuation-token=eyJPcHRpbWlzdGljRGlyZWN0RXhlY3V0aW9uVG9rZW4iOnsidG9rZW4iOiIrUklEOn42RElDQUxFR1p5alNnQVFBQUFBQURBPT0jUlQ6MSNUUkM6MTAjSVNWOjIjSUVPOjY1NTY3I1FDRjo4I0ZQQzpBZEtBQkFBQUFBQU0xSUFFQUFBQUFBdz0iLCJyYW5nZSI6eyJtaW4iOiIwNUMxRTVCNUUzNkY4NiIsIm1heCI6IkZGIn19fQ==+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects?api-version=2023-09-01-preview\u0026continuation-token=eyJPcHRpbWlzdGljRGlyZWN0RXhlY3V0aW9uVG9rZW4iOnsidG9rZW4iOiIrUklEOn42RElDQUxFR1p5alNnQVFBQUFBQURBPT0jUlQ6MSNUUkM6MTAjSVNWOjIjSUVPOjY1NTY3I1FDRjo4I0ZQQzpBZEtBQkFBQUFBQU0xSUFFQUFBQUFBdz0iLCJyYW5nZSI6eyJtaW4iOiIwNUMxRTVCNUUzNkY4NiIsIm1heCI6IkZGIn19fQ==", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "a29940e4-8bf1-4bef-ade6-37ce73bf8121" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabProject_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "727b3bf1-2ed8-490f-b0ec-bf895687a53e" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "cc9c0c12-d9e1-4da4-b999-f47fb679f4ad" ], + "x-ms-correlation-request-id": [ "cc9c0c12-d9e1-4da4-b999-f47fb679f4ad" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020858Z:cc9c0c12-d9e1-4da4-b999-f47fb679f4ad" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 32DFCA31A5354AF0BE178D89D33EC2D5 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:58Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1439" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp2\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp2\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp2\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp2\",\"name\":\"testapp2\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp1\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp1\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp1\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp1\",\"name\":\"testapp1\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"}]}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitLabProject+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "90396b5b-461c-4189-826d-b056461d4b60" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabProject_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "0dcfa3e6-c6f2-47e4-bf9c-6f7d2a2b5d9e" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "3f9f1402-1af9-4b61-a638-a75dddc7bd73" ], + "x-ms-correlation-request-id": [ "3f9f1402-1af9-4b61-a638-a75dddc7bd73" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020859Z:3f9f1402-1af9-4b61-a638-a75dddc7bd73" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 009BBB2BD7594A85BC9D71436C3CB195 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:08:59Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "713" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp0\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp0\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp0\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0\",\"name\":\"testapp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"}", + "isContentBase64": false + } + }, + "Get-AzSecurityConnectorGitLabProject+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "f5066c4e-88d9-46ff-977e-984d9554c0fb" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabProject_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "5f72c7c7-3e69-4f9e-bc41-217830ca279a" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b361ded5-3315-4d4e-a20a-7b469127aa23" ], + "x-ms-correlation-request-id": [ "b361ded5-3315-4d4e-a20a-7b469127aa23" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020900Z:b361ded5-3315-4d4e-a20a-7b469127aa23" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 949C6A2BC36E4F469DFC6AACEF151864 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:09:00Z" ], + "Date": [ "Wed, 14 Feb 2024 02:08:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "713" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testapp0\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / TestApp0\",\"fullyQualifiedParentGroupName\":\"dfdsdktests\",\"url\":\"https://gitlab.com/dfdsdktests/testapp0\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"1970-01-01T00:00:00Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/projects/testapp0\",\"name\":\"testapp0\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups/projects\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabProject.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabProject.Tests.ps1 new file mode 100644 index 000000000000..0ad21825dbcc --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabProject.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitLabProject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitLabProject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitLabProject' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $projects = Get-AzSecurityConnectorGitLabProject -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gl-01" -GroupFqName "dfdsdktests" + $projects.Count | Should -BeGreaterThan 0 + } + + It 'Get' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $project = Get-AzSecurityConnectorGitLabProject -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gl-01" -GroupFqName "dfdsdktests" -ProjectName "testapp0" + $project | Should -Not -Be $null + $project.Name.Contains('testapp0') | Should -Be $true + } + + It 'GetViaIdentity' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourcegroups/$rg/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitlabgroups/dfdsdktests/projects/testapp0" } + $project = Get-AzSecurityConnectorGitLabProject -InputObject $InputObject + $project.Count | Should -Be 1 + $project.Name.Contains('testapp0') | Should -Be $true + } +} diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabSubgroup.Recording.json b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabSubgroup.Recording.json new file mode 100644 index 000000000000..9bc7379cd715 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabSubgroup.Recording.json @@ -0,0 +1,49 @@ +{ + "Get-AzSecurityConnectorGitLabSubgroup+[NoContext]+List+$POST+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/listSubgroups?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests/listSubgroups?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "e2983c2d-6dae-40e6-abde-8ad40e76a198" ], + "CommandName": [ "Get-AzSecurityConnectorGitLabSubgroup" ], + "FullCommandName": [ "Get-AzSecurityConnectorGitLabSubgroup_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "6dc6ad2e-1dc0-4b55-bc54-92b7d8cb172a" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "dbde1bfc-3f58-414c-a410-c8723efb0087" ], + "x-ms-correlation-request-id": [ "dbde1bfc-3f58-414c-a410-c8723efb0087" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T020901Z:dbde1bfc-3f58-414c-a410-c8723efb0087" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E0899C9AD3CD454984F0712A343DD447 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:09:00Z" ], + "Date": [ "Wed, 14 Feb 2024 02:09:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1491" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testsubgroup1$testsubgroupNested\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / testsubgroup1 / Test Subgroup\",\"url\":\"https://gitlab.com/groups/dfdsdktests/testsubgroup1/testsubgroupNested\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-13T22:42:12Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests$testsubgroup1$testsubgroupNested\",\"name\":\"dfdsdktests$testsubgroup1$testsubgroupNested\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups\"},{\"properties\":{\"fullyQualifiedName\":\"dfdsdktests$testsubgroup1\",\"fullyQualifiedFriendlyName\":\"Defender for DevOps SDK Tests / testsubgroup1\",\"url\":\"https://gitlab.com/groups/dfdsdktests/testsubgroup1\",\"onboardingState\":\"Onboarded\",\"provisioningStatusMessage\":\"Resource modification successful.\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-13T22:42:14Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-gl-01/devops/default/gitLabGroups/dfdsdktests$testsubgroup1\",\"name\":\"dfdsdktests$testsubgroup1\",\"type\":\"Microsoft.Security/securityConnectors/devops/gitLabGroups\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabSubgroup.Tests.ps1 b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabSubgroup.Tests.ps1 new file mode 100644 index 000000000000..0618076aeaf6 --- /dev/null +++ b/src/Security/Security.Autorest/test/Get-AzSecurityConnectorGitLabSubgroup.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSecurityConnectorGitLabSubgroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSecurityConnectorGitLabSubgroup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzSecurityConnectorGitLabSubgroup' { + It 'List' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $groups = Get-AzSecurityConnectorGitLabSubgroup -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-gl-01" -GroupFqName "dfdsdktests" + $groups.Count | Should -BeGreaterThan 0 + } +} diff --git a/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOffboard.Tests.ps1 b/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOffboard.Tests.ps1 new file mode 100644 index 000000000000..24f2fb36ccc6 --- /dev/null +++ b/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOffboard.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSecurityApiCollectionApimOffboard')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSecurityApiCollectionApimOffboard.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSecurityApiCollectionApimOffboard' { + It 'Delete' { + "Covered in Invoke-AzSecurityApiCollectionApimOnboard Tests" | Should -Not -BeNullOrEmpty + } + + It 'DeleteViaIdentity' { + "Covered in Invoke-AzSecurityApiCollectionApimOnboard Tests" | Should -Not -BeNullOrEmpty + } +} diff --git a/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOnboard.Recording.json b/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOnboard.Recording.json new file mode 100644 index 000000000000..5fd84af5f0bd --- /dev/null +++ b/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOnboard.Recording.json @@ -0,0 +1,358 @@ +{ + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+Azure+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "2fe1279f-53f8-4bdd-bc38-bc5353582689" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard_Azure" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzA1MDEwMTc0M30=" ], + "Retry-After": [ "20" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "mise-correlation-id": [ "ce27aa27-f856-48de-9c02-b0d69082a1ee" ], + "traceparent": [ "00-114f19a6f84d03d60196659b12a97c1d-2bd3fb8c8fe6b11a-01" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "e450ade5-ae6e-4be2-bd82-4843b076fa7f" ], + "x-ms-correlation-request-id": [ "e450ade5-ae6e-4be2-bd82-4843b076fa7f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201625Z:e450ade5-ae6e-4be2-bd82-4843b076fa7f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 34079D6565E04D06B3440F2855943378 Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:16:22Z" ], + "Date": [ "Tue, 13 Feb 2024 20:16:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "320" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2\",\"name\":\"echo-api-2\",\"type\":\"Microsoft.Security/apiCollections\",\"properties\":{\"provisioningState\":\"InProgress\"}}", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+Azure+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzA1MDEwMTc0M30=+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzA1MDEwMTc0M30=", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "2fe1279f-53f8-4bdd-bc38-bc5353582689" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard_Azure" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "f8dc273f-35ab-4002-9a44-4c2dd13e7b61" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "15876140-5f0d-4296-8897-536c1e2aa276" ], + "traceparent": [ "00-78ebf7dfff3c871973be1dc322116137-8a8928fa61a84bca-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "f8dc273f-35ab-4002-9a44-4c2dd13e7b61" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201646Z:f8dc273f-35ab-4002-9a44-4c2dd13e7b61" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 87DB9B9B6FB94F4591A52F43171F5512 Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:16:45Z" ], + "Date": [ "Tue, 13 Feb 2024 20:16:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "741" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2\",\"name\":\"echo-api-2\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API 2\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net\",\"numberOfApiEndpoints\":0,\"numberOfInactiveApiEndpoints\":0,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+Azure+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzA1MDEwMTc0M30=+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzA1MDEwMTc0M30=", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "2fe1279f-53f8-4bdd-bc38-bc5353582689" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard_Azure" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "8660a1ee-7660-4b0f-a554-c0473f3bc7e8" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "e6ebd49b-338c-4250-82c0-bda0bc6d4541" ], + "traceparent": [ "00-2024a3a57497f0f2a93e8689acf697ad-2b5260abf73af707-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "8660a1ee-7660-4b0f-a554-c0473f3bc7e8" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201646Z:8660a1ee-7660-4b0f-a554-c0473f3bc7e8" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 920ACC77E31E4F8FB12F431DE9680B21 Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:16:46Z" ], + "Date": [ "Tue, 13 Feb 2024 20:16:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "741" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2\",\"name\":\"echo-api-2\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API 2\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net\",\"numberOfApiEndpoints\":0,\"numberOfInactiveApiEndpoints\":0,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+Azure+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "2b5521a2-bc94-4b73-86bb-de64dd3c46e8" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOffboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOffboard_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "mise-correlation-id": [ "e305cd8f-8428-4dc5-ba52-5b642341af8d" ], + "traceparent": [ "00-551f8da0e29928bbe473331850c6bad8-6865ffcf23435e11-01" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "8f8e549c-ddf9-4ed2-b03c-be2c4343b825" ], + "x-ms-correlation-request-id": [ "8f8e549c-ddf9-4ed2-b03c-be2c4343b825" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201648Z:8f8e549c-ddf9-4ed2-b03c-be2c4343b825" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FD50DFFFA34C41FA921C6E4A0E0C79DA Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:16:47Z" ], + "Date": [ "Tue, 13 Feb 2024 20:16:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+AzureViaIdentity+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "411cbe57-42b5-4fed-ad60-e3baab07e616" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard_AzureViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzMxNDkyMzMyMX0=" ], + "Retry-After": [ "20" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "mise-correlation-id": [ "a9458c5f-c2cd-4b09-99d8-6655ad6d2fb9" ], + "traceparent": [ "00-a935f4207591378619d58460f7b49701-05e2168590618702-01" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "f8956d77-6c33-4669-a890-75911d75aa66" ], + "x-ms-correlation-request-id": [ "f8956d77-6c33-4669-a890-75911d75aa66" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201651Z:f8956d77-6c33-4669-a890-75911d75aa66" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3FDA5A75EF2242C2B69DA0932B9E075D Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:16:49Z" ], + "Date": [ "Tue, 13 Feb 2024 20:16:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "320" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2\",\"name\":\"echo-api-2\",\"type\":\"Microsoft.Security/apiCollections\",\"properties\":{\"provisioningState\":\"InProgress\"}}", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+AzureViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzMxNDkyMzMyMX0=+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzMxNDkyMzMyMX0=", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "411cbe57-42b5-4fed-ad60-e3baab07e616" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard_AzureViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "7878b46d-3b60-42e7-8697-47020b96c81f" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "e58de0cb-cb1f-472f-8d69-487f83e6ed6c" ], + "traceparent": [ "00-524291abe4813a31b252c20273fa823a-9ca028e4a0063d9c-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "7878b46d-3b60-42e7-8697-47020b96c81f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201712Z:7878b46d-3b60-42e7-8697-47020b96c81f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F0FC29135DC443548EDD04EBB0650FE4 Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:17:11Z" ], + "Date": [ "Tue, 13 Feb 2024 20:17:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "741" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2\",\"name\":\"echo-api-2\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API 2\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net\",\"numberOfApiEndpoints\":0,\"numberOfInactiveApiEndpoints\":0,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+AzureViaIdentity+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzMxNDkyMzMyMX0=+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15\u0026$asyncScope=eyJSZXRyeVVudGlsVGlja3MiOjYzODQzNDUyMzMxNDkyMzMyMX0=", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "411cbe57-42b5-4fed-ad60-e3baab07e616" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOnboard_AzureViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "b509ffc1-ea40-4b04-9100-9115a51b53cf" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "mise-correlation-id": [ "0834e3f5-eed0-4ea1-9a89-0cb7f4aee36b" ], + "traceparent": [ "00-4ab2ba67a76b1ca4d257b3e654548833-db10c145724b7c8c-00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-correlation-request-id": [ "b509ffc1-ea40-4b04-9100-9115a51b53cf" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201713Z:b509ffc1-ea40-4b04-9100-9115a51b53cf" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A7DBC8648C0E47929FD363DA39489B43 Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:17:12Z" ], + "Date": [ "Tue, 13 Feb 2024 20:17:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "741" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2\",\"name\":\"echo-api-2\",\"type\":\"microsoft.security/apicollections\",\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"Echo API 2\",\"discoveredVia\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2\",\"baseUrl\":\"https://demoapimservice2.azure-api.net\",\"numberOfApiEndpoints\":0,\"numberOfInactiveApiEndpoints\":0,\"numberOfUnauthenticatedApiEndpoints\":0,\"numberOfExternalApiEndpoints\":0,\"numberOfApiEndpointsWithSensitiveDataExposed\":0}}", + "isContentBase64": false + } + }, + "Invoke-AzSecurityApiCollectionApimOnboard+[NoContext]+AzureViaIdentity+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/apicollectionstests/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2?api-version=2023-11-15", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "1b2b20a6-044f-480b-9bfb-bb7e67524d33" ], + "CommandName": [ "Invoke-AzSecurityApiCollectionApimOffboard" ], + "FullCommandName": [ "Invoke-AzSecurityApiCollectionApimOffboard_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "mise-correlation-id": [ "2d48893f-4bfc-4e98-b020-341ba635b802" ], + "traceparent": [ "00-7b762f367ce32f9b6336629cb4118180-74a44c6ae38e51d3-01" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "8b00dabc-6eb5-4e28-8b7a-ee17de0d7a58" ], + "x-ms-correlation-request-id": [ "8b00dabc-6eb5-4e28-8b7a-ee17de0d7a58" ], + "x-ms-routing-request-id": [ "WESTUS2:20240213T201714Z:8b00dabc-6eb5-4e28-8b7a-ee17de0d7a58" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 55D54452CA2E4574A21D59BB47A01706 Ref B: CO6AA3150217033 Ref C: 2024-02-13T20:17:14Z" ], + "Date": [ "Tue, 13 Feb 2024 20:17:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOnboard.Tests.ps1 b/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOnboard.Tests.ps1 new file mode 100644 index 000000000000..01cc64553f4f --- /dev/null +++ b/src/Security/Security.Autorest/test/Invoke-AzSecurityApiCollectionApimOnboard.Tests.ps1 @@ -0,0 +1,42 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSecurityApiCollectionApimOnboard')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSecurityApiCollectionApimOnboard.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzSecurityApiCollectionApimOnboard' { + It 'Azure' { + $rg = $env.ApiCollectionsResourceGroupName + try { + $collection = Invoke-AzSecurityApiCollectionApimOnboard -ResourceGroupName $rg -ServiceName "demoapimservice2" -ApiId "echo-api-2" + $collection.Name | Should -Be "echo-api-2" + $collection.ProvisioningState | Should -Be "Succeeded" + } finally { + Invoke-AzSecurityApiCollectionApimOffboard -ResourceGroupName $rg -ServiceName "demoapimservice2" -ApiId "echo-api-2" + } + } + + It 'AzureViaIdentity' { + $rg = $env.ApiCollectionsResourceGroupName + $sid = $env.SubscriptionId + $InputObject = @{Id = "/subscriptions/$sid/resourceGroups/$rg/providers/Microsoft.ApiManagement/service/demoapimservice2/providers/Microsoft.Security/apiCollections/echo-api-2" } + + try { + $collection = Invoke-AzSecurityApiCollectionApimOnboard -InputObject $InputObject + $collection.Name | Should -Be "echo-api-2" + $collection.ProvisioningState | Should -Be "Succeeded" + } finally { + Invoke-AzSecurityApiCollectionApimOffboard -InputObject $InputObject + } + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityAwsEnvironmentObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityAwsEnvironmentObject.Tests.ps1 new file mode 100644 index 000000000000..38d79888fe04 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityAwsEnvironmentObject.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityAwsEnvironmentObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityAwsEnvironmentObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityAwsEnvironmentObject' { + It '__AllParameterSets' { + $organization = New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012" + $environment = New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $organization + $environment.EnvironmentType | Should -Be "AwsAccount" + $environment.OrganizationalData.OrganizationMembershipType | Should -Be "Organization" + + $member = New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123" + $environment = New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $member + + $environment.EnvironmentType | Should -Be "AwsAccount" + $environment.OrganizationalData.OrganizationMembershipType | Should -Be "Member" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityAwsOrganizationalDataMasterObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityAwsOrganizationalDataMasterObject.Tests.ps1 new file mode 100644 index 000000000000..4b2391fc7062 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityAwsOrganizationalDataMasterObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityAwsOrganizationalDataMasterObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityAwsOrganizationalDataMasterObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityAwsOrganizationalDataMasterObject' { + It '__AllParameterSets' { + $organization = New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012" + $organization.OrganizationMembershipType | Should -Be "Organization" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityAwsOrganizationalDataMemberObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityAwsOrganizationalDataMemberObject.Tests.ps1 new file mode 100644 index 000000000000..6ca96e409c65 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityAwsOrganizationalDataMemberObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityAwsOrganizationalDataMemberObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityAwsOrganizationalDataMemberObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityAwsOrganizationalDataMemberObject' { + It '__AllParameterSets' { + $member = New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123" + $member.OrganizationMembershipType | Should -Be "Member" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityAzureDevOpsScopeEnvironmentObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityAzureDevOpsScopeEnvironmentObject.Tests.ps1 new file mode 100644 index 000000000000..ecd328b2f738 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityAzureDevOpsScopeEnvironmentObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityAzureDevOpsScopeEnvironmentObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityAzureDevOpsScopeEnvironmentObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityAzureDevOpsScopeEnvironmentObject' { + It '__AllParameterSets' { + $scope = New-AzSecurityAzureDevOpsScopeEnvironmentObject + $scope.EnvironmentType | Should -Be "AzureDevOpsScope" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityConnector.Recording.json b/src/Security/Security.Autorest/test/New-AzSecurityConnector.Recording.json new file mode 100644 index 000000000000..d3f5da0c6a2d --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityConnector.Recording.json @@ -0,0 +1,307 @@ +{ + "New-AzSecurityConnector+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-tests/providers/Microsoft.Security/securityConnectors/aws-sdktest01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-tests/providers/Microsoft.Security/securityConnectors/aws-sdktest01?api-version=2023-10-01-preview", + "Content": "{\r\n \"location\": \"CentralUS\",\r\n \"properties\": {\r\n \"hierarchyIdentifier\": \"891376984375\",\r\n \"environmentName\": \"AWS\",\r\n \"offerings\": [\r\n {\r\n \"offeringType\": \"CspmMonitorAws\",\r\n \"nativeCloudConnection\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/CspmMonitorAws\"\r\n }\r\n },\r\n {\r\n \"offeringType\": \"DefenderCspmAws\",\r\n \"vmScanners\": {\r\n \"configuration\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-AgentlessScanner\",\r\n \"scanningMode\": \"Default\"\r\n },\r\n \"enabled\": true\r\n },\r\n \"dataSensitivityDiscovery\": {\r\n \"enabled\": true,\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/SensitiveDataDiscovery\"\r\n },\r\n \"databasesDspm\": {\r\n \"enabled\": true,\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-DataSecurityPostureDB\"\r\n },\r\n \"ciem\": {\r\n \"ciemDiscovery\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-Ciem\"\r\n },\r\n \"ciemOidc\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-OidcCiem\",\r\n \"azureActiveDirectoryAppName\": \"mciem-aws-oidc-connector\"\r\n }\r\n },\r\n \"mdcContainersImageAssessment\": {\r\n \"enabled\": true,\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/MDCContainersImageAssessmentRole\"\r\n },\r\n \"mdcContainersAgentlessDiscoveryK8s\": {\r\n \"enabled\": true,\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/MDCContainersAgentlessDiscoveryK8sRole\"\r\n }\r\n },\r\n {\r\n \"offeringType\": \"DefenderForContainersAws\",\r\n \"kubernetesService\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s\"\r\n },\r\n \"kubernetesScubaReader\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-DataCollection\"\r\n },\r\n \"cloudWatchToKinesis\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis\"\r\n },\r\n \"kinesisToS3\": {\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/DefenderForCloud-Containers-K8s-kinesis-to-s3\"\r\n },\r\n \"mdcContainersImageAssessment\": {\r\n \"enabled\": true,\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/MDCContainersImageAssessmentRole\"\r\n },\r\n \"mdcContainersAgentlessDiscoveryK8s\": {\r\n \"enabled\": true,\r\n \"cloudRoleArn\": \"arn:aws:iam::891376984375:role/MDCContainersAgentlessDiscoveryK8sRole\"\r\n },\r\n \"enableContainerVulnerabilityAssessment\": false,\r\n \"autoProvisioning\": true,\r\n \"kubeAuditRetentionTime\": 30,\r\n \"scubaExternalId\": \"a47ae0a2-7bf7-482a-897a-7a139d30736c\"\r\n }\r\n ],\r\n \"environmentData\": {\r\n \"environmentType\": \"AwsAccount\",\r\n \"scanInterval\": 24\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "3012" ] + } + }, + "Response": { + "StatusCode": 400, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "c008130c-14ff-4ce9-9b44-55c21d7c4309" ], + "x-ms-correlation-request-id": [ "c008130c-14ff-4ce9-9b44-55c21d7c4309" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023654Z:c008130c-14ff-4ce9-9b44-55c21d7c4309" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 936563AD1C4241FBB137D02BFEB3DD58 Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:36:19Z" ], + "Date": [ "Wed, 14 Feb 2024 02:36:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "288" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"statusCode\":400,\"errorMessage\":\"error occured for security connector: Identity provider is missing from AWS account/s. Defender for Cloud cannot authenticate without it. Create the identity provider to complete the onboarding.\",\"errorCorrelation\":\"30fb370a-cd29-4275-894e-6336726bd38e\"}", + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+GCP+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-tests/providers/Microsoft.Security/securityConnectors/gcp-sdktest01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-tests/providers/Microsoft.Security/securityConnectors/gcp-sdktest01?api-version=2023-10-01-preview", + "Content": "{\r\n \"location\": \"CentralUS\",\r\n \"properties\": {\r\n \"hierarchyIdentifier\": \"843025268399\",\r\n \"environmentName\": \"GCP\",\r\n \"offerings\": [\r\n {\r\n \"offeringType\": \"CspmMonitorGcp\",\r\n \"nativeCloudConnection\": {\r\n \"workloadIdentityProviderId\": \"cspm\",\r\n \"serviceAccountEmailAddress\": \"microsoft-defender-cspm@myproject.iam.gserviceaccount.com\"\r\n }\r\n },\r\n {\r\n \"offeringType\": \"DefenderCspmGcp\",\r\n \"ciemDiscovery\": {\r\n \"workloadIdentityProviderId\": \"ciem-discovery\",\r\n \"serviceAccountEmailAddress\": \"microsoft-defender-ciem@myproject.iam.gserviceaccount.com\",\r\n \"azureActiveDirectoryAppName\": \"mciem-gcp-oidc-app\"\r\n },\r\n \"vmScanners\": {\r\n \"configuration\": {\r\n \"scanningMode\": \"Default\",\r\n \"exclusionTags\": {\r\n \"key\": \"value\"\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"dataSensitivityDiscovery\": {\r\n \"enabled\": true,\r\n \"workloadIdentityProviderId\": \"data-security-posture-storage\",\r\n \"serviceAccountEmailAddress\": \"mdc-data-sec-posture-storage@myproject.iam.gserviceaccount.com\"\r\n },\r\n \"mdcContainersImageAssessment\": {\r\n \"enabled\": true,\r\n \"workloadIdentityProviderId\": \"containers\",\r\n \"serviceAccountEmailAddress\": \"mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com\"\r\n },\r\n \"mdcContainersAgentlessDiscoveryK8s\": {\r\n \"enabled\": true,\r\n \"workloadIdentityProviderId\": \"containers\",\r\n \"serviceAccountEmailAddress\": \"mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com\"\r\n }\r\n },\r\n {\r\n \"offeringType\": \"DefenderForContainersGcp\",\r\n \"nativeCloudConnection\": {\r\n \"serviceAccountEmailAddress\": \"microsoft-defender-containers@myproject.iam.gserviceaccount.com\",\r\n \"workloadIdentityProviderId\": \"containers\"\r\n },\r\n \"dataPipelineNativeCloudConnection\": {\r\n \"serviceAccountEmailAddress\": \"ms-defender-containers-stream@myproject.iam.gserviceaccount.com\",\r\n \"workloadIdentityProviderId\": \"containers-streams\"\r\n },\r\n \"mdcContainersImageAssessment\": {\r\n \"enabled\": true,\r\n \"workloadIdentityProviderId\": \"containers\",\r\n \"serviceAccountEmailAddress\": \"mdc-containers-artifact-assess@myproject.iam.gserviceaccount.com\"\r\n },\r\n \"mdcContainersAgentlessDiscoveryK8s\": {\r\n \"enabled\": true,\r\n \"workloadIdentityProviderId\": \"containers\",\r\n \"serviceAccountEmailAddress\": \"mdc-containers-k8s-operator@myproject.iam.gserviceaccount.com\"\r\n },\r\n \"auditLogsAutoProvisioningFlag\": true,\r\n \"defenderAgentAutoProvisioningFlag\": true,\r\n \"policyAgentAutoProvisioningFlag\": true\r\n }\r\n ],\r\n \"environmentData\": {\r\n \"environmentType\": \"GcpProject\",\r\n \"projectDetails\": {\r\n \"projectNumber\": \"843025268399\",\r\n \"projectId\": \"asc-sdk-samples\"\r\n },\r\n \"scanInterval\": 24\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "3096" ] + } + }, + "Response": { + "StatusCode": 400, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "e2ca6d46-6fa3-4289-980c-d67533cbfef3" ], + "x-ms-correlation-request-id": [ "e2ca6d46-6fa3-4289-980c-d67533cbfef3" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023656Z:e2ca6d46-6fa3-4289-980c-d67533cbfef3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6163C9E4157E42B0BC5A1CE226DF723A Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:36:55Z" ], + "Date": [ "Wed, 14 Feb 2024 02:36:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "278" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"statusCode\":400,\"errorMessage\":\"error occured for security connector: There is a problem with authenticating to your GCP project. Please contact the support with given tracing ID c03b073f-7df8-48a2-8945-fd40ca5b3076.\",\"errorCorrelation\":\"d708e7c4-8856-4e8a-859b-0fd4a03b09f9\"}", + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+AzureDevOps+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-pwsh-test01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-pwsh-test01?api-version=2023-10-01-preview", + "Content": "{\r\n \"location\": \"CentralUS\",\r\n \"properties\": {\r\n \"hierarchyIdentifier\": \"de659ead-f948-45b3-9a2c-b75e8914c958\",\r\n \"environmentName\": \"AzureDevOps\",\r\n \"offerings\": [\r\n {\r\n \"offeringType\": \"CspmMonitorAzureDevOps\"\r\n }\r\n ],\r\n \"environmentData\": {\r\n \"environmentType\": \"AzureDevOpsScope\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "337" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "18b5ff97-9d9e-4f5a-8ab7-8e72621672f4" ], + "x-ms-correlation-request-id": [ "18b5ff97-9d9e-4f5a-8ab7-8e72621672f4" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023658Z:18b5ff97-9d9e-4f5a-8ab7-8e72621672f4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 55307052E2444078A7C9B0F4936C9FF6 Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:36:56Z" ], + "Date": [ "Wed, 14 Feb 2024 02:36:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "771" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"de659ead-f948-45b3-9a2c-b75e8914c958\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-pwsh-test01\",\"name\":\"ado-pwsh-test01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"CentralUS\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2024-02-14T02:36:57.1659085Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:36:57.1659085Z\"}}", + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+AzureDevOps+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-pwsh-test01?api-version=2023-10-01-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-pwsh-test01?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "576baa68-c3b0-443b-bca0-1fbbea10b8c4" ], + "CommandName": [ "Remove-AzSecurityConnector" ], + "FullCommandName": [ "Remove-AzSecurityConnector_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "ef2c1540-6e02-4cfd-97a4-3e762c130390" ], + "x-ms-correlation-request-id": [ "ef2c1540-6e02-4cfd-97a4-3e762c130390" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023702Z:ef2c1540-6e02-4cfd-97a4-3e762c130390" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54B2705FC9FD4D34B98A997B3F5EF366 Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:36:58Z" ], + "Date": [ "Wed, 14 Feb 2024 02:37:01 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+GitHub+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-pwsh-test01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-pwsh-test01?api-version=2023-10-01-preview", + "Content": "{\r\n \"location\": \"CentralUS\",\r\n \"properties\": {\r\n \"hierarchyIdentifier\": \"2ba1410d-87af-4481-8d45-e9bc26880cec\",\r\n \"environmentName\": \"Github\",\r\n \"offerings\": [\r\n {\r\n \"offeringType\": \"CspmMonitorGithub\"\r\n }\r\n ],\r\n \"environmentData\": {\r\n \"environmentType\": \"GithubScope\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "322" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "5b2b9182-fc9c-42b1-880f-6bd135b46153" ], + "x-ms-correlation-request-id": [ "5b2b9182-fc9c-42b1-880f-6bd135b46153" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023704Z:5b2b9182-fc9c-42b1-880f-6bd135b46153" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 462582CCA1BF47AEA8005D25D8C5F0E2 Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:37:02Z" ], + "Date": [ "Wed, 14 Feb 2024 02:37:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "754" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGithub\"}],\"environmentName\":\"Github\",\"hierarchyIdentifier\":\"2ba1410d-87af-4481-8d45-e9bc26880cec\",\"environmentData\":{\"environmentType\":\"GithubScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-pwsh-test01\",\"name\":\"gh-pwsh-test01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"CentralUS\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2024-02-14T02:37:03.3126891Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:37:03.3126891Z\"}}", + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+GitHub+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-pwsh-test01?api-version=2023-10-01-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gh-pwsh-test01?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "584b8cbe-cc2a-425c-aefe-7ccf64d0ebd0" ], + "CommandName": [ "Remove-AzSecurityConnector" ], + "FullCommandName": [ "Remove-AzSecurityConnector_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "570c6d35-7d1b-4de8-b93b-201eecfefda1" ], + "x-ms-correlation-request-id": [ "570c6d35-7d1b-4de8-b93b-201eecfefda1" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023707Z:570c6d35-7d1b-4de8-b93b-201eecfefda1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AFFB00BC0FF645D18186DBC01A3FA34B Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:37:04Z" ], + "Date": [ "Wed, 14 Feb 2024 02:37:06 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+GitLab+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-pwsh-test01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-pwsh-test01?api-version=2023-10-01-preview", + "Content": "{\r\n \"location\": \"CentralUS\",\r\n \"properties\": {\r\n \"hierarchyIdentifier\": \"15397162-d8b4-44d1-a5c4-024ca4aabd44\",\r\n \"environmentName\": \"GitLab\",\r\n \"offerings\": [\r\n {\r\n \"offeringType\": \"CspmMonitorGitLab\"\r\n }\r\n ],\r\n \"environmentData\": {\r\n \"environmentType\": \"GitlabScope\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "322" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "85f3d0fb-a4d0-4238-858b-34b83152be89" ], + "x-ms-correlation-request-id": [ "85f3d0fb-a4d0-4238-858b-34b83152be89" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023709Z:85f3d0fb-a4d0-4238-858b-34b83152be89" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 087746C22C2C431D9997F8F7686EDC4D Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:37:07Z" ], + "Date": [ "Wed, 14 Feb 2024 02:37:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "754" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorGitLab\"}],\"environmentName\":\"GitLab\",\"hierarchyIdentifier\":\"15397162-d8b4-44d1-a5c4-024ca4aabd44\",\"environmentData\":{\"environmentType\":\"GitlabScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-pwsh-test01\",\"name\":\"gl-pwsh-test01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"CentralUS\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2024-02-14T02:37:08.1489183Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:37:08.1489183Z\"}}", + "isContentBase64": false + } + }, + "New-AzSecurityConnector+[NoContext]+GitLab+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-pwsh-test01?api-version=2023-10-01-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/gl-pwsh-test01?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "f76c6a23-8d96-4eaf-a936-a9f414450181" ], + "CommandName": [ "Remove-AzSecurityConnector" ], + "FullCommandName": [ "Remove-AzSecurityConnector_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "248" ], + "x-ms-request-id": [ "0549f91e-3ad1-43f7-9499-218e1b2c07e6" ], + "x-ms-correlation-request-id": [ "0549f91e-3ad1-43f7-9499-218e1b2c07e6" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T023711Z:0549f91e-3ad1-43f7-9499-218e1b2c07e6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D0593C4AAE944026AEC523A89A91FACB Ref B: CO6AA3150218037 Ref C: 2024-02-14T02:37:09Z" ], + "Date": [ "Wed, 14 Feb 2024 02:37:10 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/New-AzSecurityConnector.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityConnector.Tests.ps1 new file mode 100644 index 000000000000..e1c53e101f96 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityConnector.Tests.ps1 @@ -0,0 +1,156 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityConnector')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityConnector.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityConnector' { + It 'CreateExpanded' { + $account = "891376984375" + $arnPrefix = "arn:aws:iam::$($account):role" + $cspmMonitorOffering = New-AzSecurityCspmMonitorAwsOfferingObject -NativeCloudConnectionCloudRoleArn "$arnPrefix/CspmMonitorAws" + + $dcspmOffering = New-AzSecurityDefenderCspmAwsOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryCloudRoleArn "$arnPrefix/SensitiveDataDiscovery" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" ` + -CiemDiscoveryCloudRoleArn "$arnPrefix/DefenderForCloud-Ciem" -CiemOidcAzureActiveDirectoryAppName "mciem-aws-oidc-connector" -CiemOidcCloudRoleArn "$arnPrefix/DefenderForCloud-OidcCiem" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" + + $defenderForContainersOffering = New-AzSecurityDefenderForContainersAwsOfferingObject ` + -AutoProvisioning $true -KuberneteServiceCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s" -KuberneteScubaReaderCloudRoleArn "$arnPrefix/DefenderForCloud-DataCollection" ` + -KinesiToS3CloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-kinesis-to-s3" -CloudWatchToKinesiCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" ` + -KubeAuditRetentionTime 30 -ScubaExternalId "a47ae0a2-7bf7-482a-897a-7a139d30736c" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -EnableContainerVulnerabilityAssessment $false + + # $defenderForDatabasesOffering = New-AzSecurityDefenderForDatabasesAwsOfferingObject ` + # -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + # -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" + + # $defenderForServersOffering = New-AzSecurityDefenderForServersAwsOfferingObject ` + # -DefenderForServerCloudRoleArn "$arnPrefix/DefenderForCloud-DefenderForServers" ` + # -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + # -MdeAutoProvisioningEnabled $false ` + # -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + # -VMScannerEnabled $true -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationScanningMode Default + # #-SubPlanType P2 + + $environment = New-AzSecurityAwsEnvironmentObject -ScanInterval 24 + + # Tests require complecated environment setup. For now, validating that resource provider is accepting payload and trying to access AWS + try { + New-AzSecurityConnector -Name "aws-sdktest01" -ResourceGroupName "securityConnectors-tests" -EnvironmentData $environment -EnvironmentName AWS -HierarchyIdentifier "$account" ` + -Offering @($cspmMonitorOffering, $dcspmOffering, $defenderForContainersOffering) -Location "CentralUS" + } catch { + $Error[0] | Should -Match "BadRequest" + $Error[0].Exception.ResponseBody | Should -Match "Identity provider is missing from AWS account" + } + } + + It 'GCP' { + $account = "843025268399" + $emailSuffix = "myproject.iam.gserviceaccount.com" + $cspmMonitorOffering = New-AzSecurityCspmMonitorGcpOfferingObject -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-cspm@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "cspm" + + $dcspmOffering = New-AzSecurityDefenderCspmGcpOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationExclusionTag @{key="value"} ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryServiceAccountEmailAddress "mdc-data-sec-posture-storage@$emailSuffix" -DataSensitivityDiscoveryWorkloadIdentityProviderId "data-security-posture-storage" ` + -CiemDiscoveryServiceAccountEmailAddress "microsoft-defender-ciem@$emailSuffix" -CiemDiscoveryAzureActiveDirectoryAppName "mciem-gcp-oidc-app" -CiemDiscoveryWorkloadIdentityProviderId "ciem-discovery" + + $defenderForContainersOffering = New-AzSecurityDefenderForContainersGcpOfferingObject ` + -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-containers@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "containers" ` + -DataPipelineNativeCloudConnectionServiceAccountEmailAddress "ms-defender-containers-stream@$emailSuffix" -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId "containers-streams" ` + -AuditLogsAutoProvisioningFlag $true -DefenderAgentAutoProvisioningFlag $true -PolicyAgentAutoProvisioningFlag $true ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" + + # $defenderForDatabasesOffering = New-AzSecurityDefenderForDatabasesGcpOfferingObject ` + # -ArcAutoProvisioningEnabled $true ` + # -DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress "microsoft-databases-arc-ap@" -DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId "defender-for-databases-arc-ap" + + # $defenderForServersOffering = New-AzSecurityDefenderForServersGcpOfferingObject ` + # -DefenderForServerServiceAccountEmailAddress "microsoft-defender-for-servers@$emailSuffix" -DefenderForServerWorkloadIdentityProviderId "defender-for-servers" ` + # -ArcAutoProvisioningEnabled $true -MdeAutoProvisioningEnabled $true -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + # -VMScannerEnabled $true -ConfigurationScanningMode Default + + $environment = New-AzSecurityGcpProjectEnvironmentObject -ScanInterval 24 -ProjectDetailProjectId "asc-sdk-samples" -ProjectDetailProjectNumber "$account" + + # Tests require complecated environment setup. For now, validating that resource provider is accepting payload and trying to access GCP + try { + New-AzSecurityConnector -Name "gcp-sdktest01" -ResourceGroupName "securityConnectors-tests" -EnvironmentData $environment -EnvironmentName GCP -HierarchyIdentifier "$account" ` + -Offering @($cspmMonitorOffering, $dcspmOffering, $defenderForContainersOffering) -Location "CentralUS" + } catch { + $Error[0] | Should -Match "BadRequest" + $Error[0].Exception.ResponseBody | Should -Match "There is a problem with authenticating to your GCP project" + } + } + + It 'AzureDevOps' { + $rg = "securityConnectors-pwsh-tmp" + $sid = $env.SubscriptionId + $connectorName = "ado-pwsh-test01" + $hierarchyIdentifier = "de659ead-f948-45b3-9a2c-b75e8914c958" + try { + $connector = New-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName ` + -EnvironmentName AzureDevOps -EnvironmentData (New-AzSecurityAzureDevOpsScopeEnvironmentObject) ` + -HierarchyIdentifier $hierarchyIdentifier -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorAzureDevOpsOfferingObject) + } finally { + Remove-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName + } + + $connector | Should -Not -Be $null + $connector.EnvironmentName | Should -Be "AzureDevOps" + } + + It 'GitHub' { + $rg = "securityConnectors-pwsh-tmp" + $sid = $env.SubscriptionId + $connectorName = "gh-pwsh-test01" + $hierarchyIdentifier = "2ba1410d-87af-4481-8d45-e9bc26880cec" + try { + $connector = New-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName ` + -EnvironmentName Github -EnvironmentData (New-AzSecurityGitHubScopeEnvironmentObject) ` + -HierarchyIdentifier $hierarchyIdentifier -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorGithubOfferingObject) + } finally { + Remove-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName + } + + $connector | Should -Not -Be $null + $connector.EnvironmentName | Should -Be "GitHub" + } + + It 'GitLab' { + $rg = "securityConnectors-pwsh-tmp" + $sid = $env.SubscriptionId + $connectorName = "gl-pwsh-test01" + $hierarchyIdentifier = "15397162-d8b4-44d1-a5c4-024ca4aabd44" + try { + $connector = New-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName ` + -EnvironmentName GitLab -EnvironmentData (New-AzSecurityGitLabScopeEnvironmentObject) ` + -HierarchyIdentifier $hierarchyIdentifier -Location "CentralUS" ` + -Offering @(New-AzSecurityCspmMonitorGitLabOfferingObject) + } finally { + Remove-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName + } + + $connector | Should -Not -Be $null + $connector.EnvironmentName | Should -Be "GitLab" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityConnectorActionableRemediationObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityConnectorActionableRemediationObject.Tests.ps1 new file mode 100644 index 000000000000..670b86141da1 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityConnectorActionableRemediationObject.Tests.ps1 @@ -0,0 +1,26 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityConnectorActionableRemediationObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityConnectorActionableRemediationObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityConnectorActionableRemediationObject' { + It '__AllParameterSets' { + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled ` + -BranchConfiguration @{AnnotateDefaultBranch="Enabled"; branchName=@("main", "hotfix")} -CategoryConfiguration @( @{category="First"; minimumSeverityLevel="High"}, @{category="Second"; minimumSeverityLevel="Low"}) + $config.State | Should -Be "Enabled" + $config.InheritFromParentState | Should -Be "Disabled" + $config.CategoryConfiguration.Count | Should -Be 2 + $config.BranchConfiguration.BranchName.Count | Should -Be 2 + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityConnectorDevOpsConfiguration.Recording.json b/src/Security/Security.Autorest/test/New-AzSecurityConnectorDevOpsConfiguration.Recording.json new file mode 100644 index 000000000000..2c9c583d5490 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityConnectorDevOpsConfiguration.Recording.json @@ -0,0 +1,266 @@ +{ + "New-AzSecurityConnectorDevOpsConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02?api-version=2023-10-01-preview", + "Content": "{\r\n \"location\": \"CentralUS\",\r\n \"properties\": {\r\n \"hierarchyIdentifier\": \"75ebbca5-8b2b-48b2-93e6-d241b2993ed3\",\r\n \"environmentName\": \"AzureDevOps\",\r\n \"offerings\": [\r\n {\r\n \"offeringType\": \"CspmMonitorAzureDevOps\"\r\n }\r\n ],\r\n \"environmentData\": {\r\n \"environmentType\": \"AzureDevOpsScope\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "337" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "256fbf3d-8a56-4939-a5bb-86e913bbfd32" ], + "x-ms-correlation-request-id": [ "256fbf3d-8a56-4939-a5bb-86e913bbfd32" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021048Z:256fbf3d-8a56-4939-a5bb-86e913bbfd32" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F906DEEB0C8B476A811AC68909AC39E1 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:10:47Z" ], + "Date": [ "Wed, 14 Feb 2024 02:10:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "779" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"75ebbca5-8b2b-48b2-93e6-d241b2993ed3\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/securityconnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02\",\"name\":\"ado-sdk-pwsh-test02\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"CentralUS\",\"tags\":{},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2024-02-14T02:10:47.9139838Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:10:47.9139838Z\"}}", + "isContentBase64": false + } + }, + "New-AzSecurityConnectorDevOpsConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default?api-version=2023-09-01-preview+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"authorization\": {\r\n \"code\": \"dummyCode\"\r\n },\r\n \"autoDiscovery\": \"Disabled\",\r\n \"topLevelInventoryList\": [ \"abc\", \"def\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "168" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "a809d42d-a2cc-4bb6-8aab-f6391a828f77" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/b5d1fdf5-beec-43e1-893c-bd26ebc0b954?api-version=2023-09-01-preview\u0026t=638434734513279119\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8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BUd9FQSvkh_7UTvXFa__EjC0TEiG4K8f8PlcDnr-7I5HXg\u0026h=5OoXakCfO4X3DCVPJfmiH0eBX52K5zl0KZpSaqkFg_s" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "11cf66c1-49ed-40a9-8335-2b832ccacde4" ], + "x-ms-correlation-request-id": [ "11cf66c1-49ed-40a9-8335-2b832ccacde4" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021051Z:11cf66c1-49ed-40a9-8335-2b832ccacde4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 18553A070F6A48A08E4CFE09B3A8A05B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:10:48Z" ], + "Date": [ "Wed, 14 Feb 2024 02:10:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "405" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"tags\":{},\"properties\":{\"authorization\":{\"code\":\"\"},\"autoDiscovery\":\"Disabled\",\"topLevelInventoryList\":[\"abc\",\"def\"],\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "New-AzSecurityConnectorDevOpsConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/b5d1fdf5-beec-43e1-893c-bd26ebc0b954?api-version=2023-09-01-preview\u0026t=638434734513279119\u0026c=MIIHADCCBeigAwIBAg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nDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=usSIoSYp5NLDL7ddddInM2GZQRUwZiIvmCjTZB3XjNE_q_QdYjEfz_Xf0o-8kwuSaN6GxrcKTGxwLPJh85eWEZlBcXcvUDcvg7XmKArSytjmblRDHBQO4k6Sm_V3nHi6ySbleKpscxaWlmY7jI3JsnZz5ABgbKumvtB41H1lwlnM_3fJoaexe9fFUcRAIK2oGC4esrNSHLRyG51BP_6hcvQoJl4scj-6dE01-BEl8EmLnZRxVgmrftmvCOKcKDvm2cRuajHA-lF1eAjuv-af8owf8n8cdM4xU3HAw1P0BUd9FQSvkh_7UTvXFa__EjC0TEiG4K8f8PlcDnr-7I5HXg\u0026h=5OoXakCfO4X3DCVPJfmiH0eBX52K5zl0KZpSaqkFg_s+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/b5d1fdf5-beec-43e1-893c-bd26ebc0b954?api-version=2023-09-01-preview\u0026t=638434734513279119\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29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WI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=usSIoSYp5NLDL7ddddInM2GZQRUwZiIvmCjTZB3XjNE_q_QdYjEfz_Xf0o-8kwuSaN6GxrcKTGxwLPJh85eWEZlBcXcvUDcvg7XmKArSytjmblRDHBQO4k6Sm_V3nHi6ySbleKpscxaWlmY7jI3JsnZz5ABgbKumvtB41H1lwlnM_3fJoaexe9fFUcRAIK2oGC4esrNSHLRyG51BP_6hcvQoJl4scj-6dE01-BEl8EmLnZRxVgmrftmvCOKcKDvm2cRuajHA-lF1eAjuv-af8owf8n8cdM4xU3HAw1P0BUd9FQSvkh_7UTvXFa__EjC0TEiG4K8f8PlcDnr-7I5HXg\u0026h=5OoXakCfO4X3DCVPJfmiH0eBX52K5zl0KZpSaqkFg_s", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "57" ], + "x-ms-client-request-id": [ "30bb0587-40f3-43e9-8328-7a0d60f34541" ], + "CommandName": [ "New-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "New-AzSecurityConnectorDevOpsConfiguration_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "7ce0cd86-2af9-4de0-8350-c5755ec1ccf0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b503bd4e-f468-4b25-954e-88fef66b6edd" ], + "x-ms-correlation-request-id": [ "b503bd4e-f468-4b25-954e-88fef66b6edd" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021111Z:b503bd4e-f468-4b25-954e-88fef66b6edd" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4C1AE0C8194B468C8681E27B74A2571B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:11Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "479" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/b5d1fdf5-beec-43e1-893c-bd26ebc0b954\",\"name\":\"b5d1fdf5-beec-43e1-893c-bd26ebc0b954\",\"status\":\"Failed\",\"startTime\":\"2024-02-14T02:10:49.5752881Z\",\"endTime\":\"2024-02-14T02:11:05.5830468Z\",\"error\":{\"code\":\"TokenExchangeFailed\",\"message\":\"AzureDevOps OAuth token exchange failed\"}}", + "isContentBase64": false + } + }, + "New-AzSecurityConnectorDevOpsConfiguration+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default?api-version=2023-09-01-preview+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "58" ], + "x-ms-client-request-id": [ "592d513a-5ee1-402b-9b0d-ccae4679b155" ], + "CommandName": [ "Remove-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Remove-AzSecurityConnectorDevOpsConfiguration_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "b1f73c89-a1d2-4594-86dd-3992fc19ef2b" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/c200bb06-4204-4a06-9085-41fede78cef2?api-version=2023-09-01-preview\u0026t=638434734726964462\u0026c=MI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WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=UGsK_0AMcS5_W7lB4PudsKl7qCSA4JWWeSNpvocGA4IFrJCX0Ya-9ZB2xVRBKWJnX6c3yxRxIVgJVloB9rlQhIMp6Op5HW5B0WQAMqHa9jGrn7yBaSaaa9Zlf1eKJzz3-1DggGpobLBbrJYbWC_SUml39A0v1r48dE4NZ7htoWCIDJ_5-F4sXSmY5PppjgFLTTiCtffHRMhAq5fp7daNQy0W5P1sZZ-jDfeClorEQgD7O32v4tfjtIhTcKNaxd-ax4bm0DqFn-b11QQuDs6QXX3_i8aeIRetJ5Pgkjdn50IXG4uS6bbS-pENGudxEXxDPzH_u2u9awBQE6oySLo2rQ\u0026h=Jc8eZTvsCKxvcNiCM1c3-BkACrs1-21xY9R-IoYaG58" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "c469118c-1f5c-4de6-8c60-c6ecf243332f" ], + "x-ms-correlation-request-id": [ "c469118c-1f5c-4de6-8c60-c6ecf243332f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021112Z:c469118c-1f5c-4de6-8c60-c6ecf243332f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0D10F3A5BCE8490FBB9BA22226B2D794 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:12Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "283" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"tags\":{},\"properties\":{},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "New-AzSecurityConnectorDevOpsConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/c200bb06-4204-4a06-9085-41fede78cef2?api-version=2023-09-01-preview\u0026t=638434734726964462\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7u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ySLo2rQ\u0026h=Jc8eZTvsCKxvcNiCM1c3-BkACrs1-21xY9R-IoYaG58+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/c200bb06-4204-4a06-9085-41fede78cef2?api-version=2023-09-01-preview\u0026t=638434734726964462\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6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NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=UGsK_0AMcS5_W7lB4PudsKl7qCSA4JWWeSNpvocGA4IFrJCX0Ya-9ZB2xVRBKWJnX6c3yxRxIVgJVloB9rlQhIMp6Op5HW5B0WQAMqHa9jGrn7yBaSaaa9Zlf1eKJzz3-1DggGpobLBbrJYbWC_SUml39A0v1r48dE4NZ7htoWCIDJ_5-F4sXSmY5PppjgFLTTiCtffHRMhAq5fp7daNQy0W5P1sZZ-jDfeClorEQgD7O32v4tfjtIhTcKNaxd-ax4bm0DqFn-b11QQuDs6QXX3_i8aeIRetJ5Pgkjdn50IXG4uS6bbS-pENGudxEXxDPzH_u2u9awBQE6oySLo2rQ\u0026h=Jc8eZTvsCKxvcNiCM1c3-BkACrs1-21xY9R-IoYaG58", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "59" ], + "x-ms-client-request-id": [ "592d513a-5ee1-402b-9b0d-ccae4679b155" ], + "CommandName": [ "Remove-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Remove-AzSecurityConnectorDevOpsConfiguration_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "39ed5d72-802a-4319-be30-b0f52129f129" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "980a1fba-f8e3-4e06-95ad-0fdc5adeda1f" ], + "x-ms-correlation-request-id": [ "980a1fba-f8e3-4e06-95ad-0fdc5adeda1f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021133Z:980a1fba-f8e3-4e06-95ad-0fdc5adeda1f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9423D424E0EF4AB18E366CB46721DD1B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:33Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "389" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02/devops/default/operationResults/c200bb06-4204-4a06-9085-41fede78cef2\",\"name\":\"c200bb06-4204-4a06-9085-41fede78cef2\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:11:12.502874Z\",\"endTime\":\"2024-02-14T02:11:21.740658Z\"}", + "isContentBase64": false + } + }, + "New-AzSecurityConnectorDevOpsConfiguration+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02?api-version=2023-10-01-preview+6": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/securityConnectors-pwsh-tmp/providers/Microsoft.Security/securityConnectors/ado-sdk-pwsh-test02?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "60" ], + "x-ms-client-request-id": [ "b5675799-81cc-4f7e-8cb7-5669dca79287" ], + "CommandName": [ "Remove-AzSecurityConnector" ], + "FullCommandName": [ "Remove-AzSecurityConnector_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "78ed26ee-7a7f-4fec-ab0d-bbf341d5c6d1" ], + "x-ms-correlation-request-id": [ "78ed26ee-7a7f-4fec-ab0d-bbf341d5c6d1" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021137Z:78ed26ee-7a7f-4fec-ab0d-bbf341d5c6d1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BA13D686BC1242DB86CD6DBF9544A773 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:33Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:36 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/New-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 new file mode 100644 index 000000000000..3cc529dca01b --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 @@ -0,0 +1,37 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityConnectorDevOpsConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityConnectorDevOpsConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityConnectorDevOpsConfiguration' { + It 'CreateExpanded' { + $rg = "securityConnectors-pwsh-tmp" + $sid = $env.SubscriptionId + $connectorName = "ado-sdk-pwsh-test02" + $hierarchyIdentifier = "75ebbca5-8b2b-48b2-93e6-d241b2993ed3" + + # Tests require complecated environment setup. For now, validating that resource provider is accepting payload and trying to access DevOps environment + try { + New-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName -EnvironmentName AzureDevOps -EnvironmentData (New-AzSecurityAzureDevOpsScopeEnvironmentObject) -HierarchyIdentifier $hierarchyIdentifier -Location "CentralUS" -Offering @(New-AzSecurityCspmMonitorAzureDevOpsOfferingObject) + + New-AzSecurityConnectorDevOpsConfiguration -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName $connectorName -AutoDiscovery Disabled -TopLevelInventoryList @("abc", "def") -AuthorizationCode "dummyCode" + } catch { + $Error[0] | Should -Match "OAuth token exchange failed" + $Error[0].Exception.ResponseBody | Should -Match "TokenExchangeFailed" + } finally { + try { Remove-AzSecurityConnectorDevOpsConfiguration -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName $connectorName } catch {} + try { Remove-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name $connectorName } catch {} + } + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorAwsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorAwsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..2c6245c1c3e4 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorAwsOfferingObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityCspmMonitorAwsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityCspmMonitorAwsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityCspmMonitorAwsOfferingObject' { + It '__AllParameterSets' { + $offering = New-AzSecurityCspmMonitorAwsOfferingObject -NativeCloudConnectionCloudRoleArn "arn:aws:iam::123456789012:role/CspmMonitorAws" + $offering.OfferingType | Should -Be "CspmMonitorAws" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..485abe547b9a --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityCspmMonitorAzureDevOpsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityCspmMonitorAzureDevOpsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityCspmMonitorAzureDevOpsOfferingObject' { + It '__AllParameterSets' { + $offering = New-AzSecurityCspmMonitorAzureDevOpsOfferingObject + $offering.OfferingType | Should -Be "CspmMonitorAzureDevOps" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGcpOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGcpOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..52801384ad3f --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGcpOfferingObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityCspmMonitorGcpOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityCspmMonitorGcpOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityCspmMonitorGcpOfferingObject' { + It '__AllParameterSets' { + $offering = New-AzSecurityCspmMonitorGcpOfferingObject -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-cspm@asc-sdk-samples.iam.gserviceaccount.com" -NativeCloudConnectionWorkloadIdentityProviderId "cspm" + $offering.OfferingType | Should -Be "CspmMonitorGcp" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGitLabOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGitLabOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..e189c411ce91 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGitLabOfferingObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityCspmMonitorGitLabOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityCspmMonitorGitLabOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityCspmMonitorGitLabOfferingObject' { + It '__AllParameterSets' { + $offering = New-AzSecurityCspmMonitorGitLabOfferingObject + $offering.OfferingType | Should -Be "CspmMonitorGitLab" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGithubOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGithubOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..ea87f0509920 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityCspmMonitorGithubOfferingObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityCspmMonitorGithubOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityCspmMonitorGithubOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityCspmMonitorGithubOfferingObject' { + It '__AllParameterSets' { + $offering = New-AzSecurityCspmMonitorGithubOfferingObject + $offering.OfferingType | Should -Be "CspmMonitorGitHub" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderCspmAwsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderCspmAwsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..0534bd99fb4f --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderCspmAwsOfferingObject.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderCspmAwsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderCspmAwsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderCspmAwsOfferingObject' { + It '__AllParameterSets' { + $arnPrefix = "arn:aws:iam::123456789012:role" + $offering = New-AzSecurityDefenderCspmAwsOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationExclusionTag @{key="value"} ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryCloudRoleArn "$arnPrefix/SensitiveDataDiscovery" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" ` + -CiemDiscoveryCloudRoleArn "$arnPrefix/DefenderForCloud-Ciem" -CiemOidcAzureActiveDirectoryAppName "mciem-aws-oidc-connector" -CiemOidcCloudRoleArn "$arnPrefix/DefenderForCloud-OidcCiem" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" + + $offering.OfferingType | Should -Be "DefenderCspmAws" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderCspmGcpOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderCspmGcpOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..eeea315ca62d --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderCspmGcpOfferingObject.Tests.ps1 @@ -0,0 +1,28 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderCspmGcpOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderCspmGcpOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderCspmGcpOfferingObject' { + It '__AllParameterSets' { + $emailSuffix = "myproject.iam.gserviceaccount.com" + $offering = New-AzSecurityDefenderCspmGcpOfferingObject ` + -VMScannerEnabled $true -ConfigurationScanningMode Default -ConfigurationExclusionTag @{key="value"} ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" ` + -DataSensitivityDiscoveryEnabled $true -DataSensitivityDiscoveryServiceAccountEmailAddress "mdc-data-sec-posture-storage@$emailSuffix" -DataSensitivityDiscoveryWorkloadIdentityProviderId "data-security-posture-storage" ` + -CiemDiscoveryServiceAccountEmailAddress "microsoft-defender-ciem@$emailSuffix" -CiemDiscoveryAzureActiveDirectoryAppName "mciem-gcp-oidc-app" -CiemDiscoveryWorkloadIdentityProviderId "ciem-discovery" + $offering.OfferingType | Should -Be "DefenderCspmGcp" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderForContainersAwsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForContainersAwsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..dcf58b92afab --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForContainersAwsOfferingObject.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderForContainersAwsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderForContainersAwsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderForContainersAwsOfferingObject' { + It '__AllParameterSets' { + $arnPrefix = "arn:aws:iam::123456789012:role" + $offering = New-AzSecurityDefenderForContainersAwsOfferingObject ` + -AutoProvisioning $true -KuberneteServiceCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s" -KuberneteScubaReaderCloudRoleArn "$arnPrefix/DefenderForCloud-DataCollection" ` + -KinesiToS3CloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-kinesis-to-s3" -CloudWatchToKinesiCloudRoleArn "$arnPrefix/DefenderForCloud-Containers-K8s-cloudwatch-to-kinesis" ` + -KubeAuditRetentionTime 30 -ScubaExternalId "a47ae0a2-7bf7-482a-897a-7a139d30736c" ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SCloudRoleArn "$arnPrefix/MDCContainersAgentlessDiscoveryK8sRole" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentCloudRoleArn "$arnPrefix/MDCContainersImageAssessmentRole" ` + -EnableContainerVulnerabilityAssessment $false + + $offering.OfferingType | Should -Be "DefenderForContainersAws" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderForContainersGcpOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForContainersGcpOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..03920d6c8c61 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForContainersGcpOfferingObject.Tests.ps1 @@ -0,0 +1,28 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderForContainersGcpOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderForContainersGcpOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderForContainersGcpOfferingObject' { + It '__AllParameterSets' { + $emailSuffix = "myproject.iam.gserviceaccount.com" + $offering = New-AzSecurityDefenderForContainersGcpOfferingObject ` + -NativeCloudConnectionServiceAccountEmailAddress "microsoft-defender-containers@$emailSuffix" -NativeCloudConnectionWorkloadIdentityProviderId "containers" ` + -DataPipelineNativeCloudConnectionServiceAccountEmailAddress "ms-defender-containers-stream@$emailSuffix" -DataPipelineNativeCloudConnectionWorkloadIdentityProviderId "containers-streams" ` + -AuditLogsAutoProvisioningFlag $true -DefenderAgentAutoProvisioningFlag $true -PolicyAgentAutoProvisioningFlag $true ` + -MdcContainerAgentlessDiscoveryK8SEnabled $true -MdcContainerAgentlessDiscoveryK8SWorkloadIdentityProviderId "containers" -MdcContainerAgentlessDiscoveryK8SServiceAccountEmailAddress "mdc-containers-k8s-operator@$emailSuffix" ` + -MdcContainerImageAssessmentEnabled $true -MdcContainerImageAssessmentWorkloadIdentityProviderId "containers" -MdcContainerImageAssessmentServiceAccountEmailAddress "mdc-containers-artifact-assess@$emailSuffix" + $offering.OfferingType | Should -Be "DefenderForContainersGcp" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderForDatabasesAwsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForDatabasesAwsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..56794a20be49 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForDatabasesAwsOfferingObject.Tests.ps1 @@ -0,0 +1,26 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderForDatabasesAwsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderForDatabasesAwsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderForDatabasesAwsOfferingObject' { + It '__AllParameterSets' { + $arnPrefix = "arn:aws:iam::123456789012:role" + $offering = New-AzSecurityDefenderForDatabasesAwsOfferingObject ` + -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + -DatabaseDspmEnabled $true -DatabaseDspmCloudRoleArn "$arnPrefix/DefenderForCloud-DataSecurityPostureDB" + + $offering.OfferingType | Should -Be "DefenderForDatabasesAws" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderForDatabasesGcpOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForDatabasesGcpOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..cd9077e9f848 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForDatabasesGcpOfferingObject.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderForDatabasesGcpOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderForDatabasesGcpOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderForDatabasesGcpOfferingObject' { + It '__AllParameterSets' { + $emailSuffix = "myproject.iam.gserviceaccount.com" + $offering = New-AzSecurityDefenderForDatabasesGcpOfferingObject ` + -ArcAutoProvisioningEnabled $true ` + -DefenderForDatabaseArcAutoProvisioningServiceAccountEmailAddress "microsoft-databases-arc-ap@" -DefenderForDatabaseArcAutoProvisioningWorkloadIdentityProviderId "defender-for-databases-arc-ap" + $offering.OfferingType | Should -Be "DefenderForDatabasesGcp" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderForServersAwsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForServersAwsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..d99e5c7ec0da --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForServersAwsOfferingObject.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderForServersAwsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderForServersAwsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderForServersAwsOfferingObject' { + It '__AllParameterSets' { + $arnPrefix = "arn:aws:iam::123456789012:role" + $offering = New-AzSecurityDefenderForServersAwsOfferingObject ` + -DefenderForServerCloudRoleArn "$arnPrefix/DefenderForCloud-DefenderForServers" ` + -ArcAutoProvisioningEnabled $true -ArcAutoProvisioningCloudRoleArn "$arnPrefix/DefenderForCloud-ArcAutoProvisioning" ` + -MdeAutoProvisioningEnabled $true ` + -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + -VMScannerEnabled $true -ConfigurationCloudRoleArn "$arnPrefix/DefenderForCloud-AgentlessScanner" -ConfigurationScanningMode Default ` + -SubPlanType P2 + + $offering.OfferingType | Should -Be "DefenderForServersAws" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityDefenderForServersGcpOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForServersGcpOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..f24ec9a501c2 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityDefenderForServersGcpOfferingObject.Tests.ps1 @@ -0,0 +1,27 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityDefenderForServersGcpOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityDefenderForServersGcpOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityDefenderForServersGcpOfferingObject' { + It '__AllParameterSets' { + $emailSuffix = "myproject.iam.gserviceaccount.com" + $offering = New-AzSecurityDefenderForServersGcpOfferingObject ` + -DefenderForServerServiceAccountEmailAddress "microsoft-defender-for-servers@$emailSuffix" -DefenderForServerWorkloadIdentityProviderId "defender-for-servers" ` + -ArcAutoProvisioningEnabled $true -MdeAutoProvisioningEnabled $true -VaAutoProvisioningEnabled $true -ConfigurationType TVM ` + -VMScannerEnabled $true -ConfigurationScanningMode Default ` + -SubPlanType P2 + $offering.OfferingType | Should -Be "DefenderForServersGcp" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityGcpOrganizationalDataMemberObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityGcpOrganizationalDataMemberObject.Tests.ps1 new file mode 100644 index 000000000000..a2a876cd9184 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityGcpOrganizationalDataMemberObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityGcpOrganizationalDataMemberObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityGcpOrganizationalDataMemberObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityGcpOrganizationalDataMemberObject' { + It '__AllParameterSets' { + $env = New-AzSecurityGcpOrganizationalDataMemberObject -ManagementProjectNumber "12345" -ParentHierarchyId "00000" + $env.OrganizationMembershipType | Should -Be "Member" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityGcpOrganizationalDataOrganizationObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityGcpOrganizationalDataOrganizationObject.Tests.ps1 new file mode 100644 index 000000000000..5b16f5904dd5 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityGcpOrganizationalDataOrganizationObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityGcpOrganizationalDataOrganizationObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityGcpOrganizationalDataOrganizationObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityGcpOrganizationalDataOrganizationObject' { + It '__AllParameterSets' { + $env = New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2) + $env.OrganizationMembershipType | Should -Be "Organization" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityGcpProjectEnvironmentObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityGcpProjectEnvironmentObject.Tests.ps1 new file mode 100644 index 000000000000..9a7702b25261 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityGcpProjectEnvironmentObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityGcpProjectEnvironmentObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityGcpProjectEnvironmentObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityGcpProjectEnvironmentObject' { + It '__AllParameterSets' { + $orgData = New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2) + $environment = New-AzSecurityGcpProjectEnvironmentObject -ProjectDetailProjectId "asc-sdk-samples" -ScanInterval 24 -OrganizationalData $orgData -ProjectDetailProjectNumber "1234" + $environment.EnvironmentType | Should -Be "GcpProject" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityGitHubScopeEnvironmentObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityGitHubScopeEnvironmentObject.Tests.ps1 new file mode 100644 index 000000000000..47877838fd49 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityGitHubScopeEnvironmentObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityGitHubScopeEnvironmentObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityGitHubScopeEnvironmentObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityGitHubScopeEnvironmentObject' { + It '__AllParameterSets' { + $scope = New-AzSecurityGitHubScopeEnvironmentObject + $scope.EnvironmentType | Should -Be "GithubScope" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityGitLabScopeEnvironmentObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityGitLabScopeEnvironmentObject.Tests.ps1 new file mode 100644 index 000000000000..39a20f308e20 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityGitLabScopeEnvironmentObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityGitLabScopeEnvironmentObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityGitLabScopeEnvironmentObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityGitLabScopeEnvironmentObject' { + It '__AllParameterSets' { + $scope = New-AzSecurityGitLabScopeEnvironmentObject + $scope.EnvironmentType | Should -Be "GitlabScope" + } +} diff --git a/src/Security/Security.Autorest/test/New-AzSecurityInformationProtectionAwsOfferingObject.Tests.ps1 b/src/Security/Security.Autorest/test/New-AzSecurityInformationProtectionAwsOfferingObject.Tests.ps1 new file mode 100644 index 000000000000..2beef0575db2 --- /dev/null +++ b/src/Security/Security.Autorest/test/New-AzSecurityInformationProtectionAwsOfferingObject.Tests.ps1 @@ -0,0 +1,22 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzSecurityInformationProtectionAwsOfferingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzSecurityInformationProtectionAwsOfferingObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzSecurityInformationProtectionAwsOfferingObject' { + It '__AllParameterSets' { + $offering = New-AzSecurityInformationProtectionAwsOfferingObject -InformationProtectionCloudRoleArn "arn:aws:iam::123456789012:role/myRole" + $offering.OfferingType | Should -Be "InformationProtectionAws" + } +} diff --git a/src/Security/Security.Autorest/test/README.md b/src/Security/Security.Autorest/test/README.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/Security/Security.Autorest/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Remove-AzSecurityConnector.Tests.ps1 b/src/Security/Security.Autorest/test/Remove-AzSecurityConnector.Tests.ps1 new file mode 100644 index 000000000000..ed357f5d2915 --- /dev/null +++ b/src/Security/Security.Autorest/test/Remove-AzSecurityConnector.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzSecurityConnector')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzSecurityConnector.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzSecurityConnector' { + It 'Delete' { + "Tested in New-AzSecurityConnector.Tests" | Should -Not -BeNullOrEmpty + } + + It 'DeleteViaIdentity' { + "Tested in New-AzSecurityConnector.Tests" | Should -Not -BeNullOrEmpty + } +} diff --git a/src/Security/Security.Autorest/test/Remove-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 b/src/Security/Security.Autorest/test/Remove-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 new file mode 100644 index 000000000000..2dc8b30682d3 --- /dev/null +++ b/src/Security/Security.Autorest/test/Remove-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzSecurityConnectorDevOpsConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzSecurityConnectorDevOpsConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzSecurityConnectorDevOpsConfiguration' { + It 'Delete' { + "Tested in New-AzSecurityConnectorDevOpsConfiguration.Tests" | Should -Not -BeNullOrEmpty } + + It 'DeleteViaIdentity' { + "Tested in New-AzSecurityConnectorDevOpsConfiguration.Tests" | Should -Not -BeNullOrEmpty + } +} diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnector.Recording.json b/src/Security/Security.Autorest/test/Update-AzSecurityConnector.Recording.json new file mode 100644 index 000000000000..101f36a131f6 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnector.Recording.json @@ -0,0 +1,121 @@ +{ + "Update-AzSecurityConnector+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview", + "Content": "{\r\n \"tags\": {\r\n \"pwshsdktest\": \"true\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "49" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "a914766b-4c53-46cb-ba32-71a1c37492d9" ], + "x-ms-correlation-request-id": [ "a914766b-4c53-46cb-ba32-71a1c37492d9" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021144Z:a914766b-4c53-46cb-ba32-71a1c37492d9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 384311590B0945199001A726D3336712 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:43Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "831" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:11:43.7724172Z\"}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnector+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "62" ], + "x-ms-client-request-id": [ "75ae0af8-b716-44f6-ab63-5ff8bed40b22" ], + "CommandName": [ "Get-AzSecurityConnector" ], + "FullCommandName": [ "Get-AzSecurityConnector_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "99" ], + "x-ms-request-id": [ "bd6eaf32-5e58-4895-96a9-72ecd803fc40" ], + "x-ms-correlation-request-id": [ "bd6eaf32-5e58-4895-96a9-72ecd803fc40" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021145Z:bd6eaf32-5e58-4895-96a9-72ecd803fc40" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C681319AD792481DAEA4DCC0E132ACAA Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:45Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "831" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:11:43.7724172Z\"}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnector+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01?api-version=2023-10-01-preview", + "Content": "{\r\n \"tags\": {\r\n \"pwshsdktest2\": \"true\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "50" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "249" ], + "x-ms-request-id": [ "e2252d28-6673-4f85-ac08-f5075e3ee0c2" ], + "x-ms-correlation-request-id": [ "e2252d28-6673-4f85-ac08-f5075e3ee0c2" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021147Z:e2252d28-6673-4f85-ac08-f5075e3ee0c2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 92ABB1C940F449D3ABC0B51680D3680C Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:46Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "832" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"offerings\":[{\"offeringType\":\"CspmMonitorAzureDevOps\"}],\"environmentName\":\"AzureDevOps\",\"hierarchyIdentifier\":\"4a8eb7f1-f533-48c5-b102-9b09e90906b7\",\"environmentData\":{\"environmentType\":\"AzureDevOpsScope\"}},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourcegroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01\",\"name\":\"dfdsdktests-azdo-01\",\"type\":\"Microsoft.Security/securityconnectors\",\"location\":\"centralus\",\"tags\":{\"pwshsdktest2\":\"true\"},\"systemData\":{\"createdBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"createdByType\":\"Application\",\"createdAt\":\"2023-12-07T06:38:36.3536844Z\",\"lastModifiedBy\":\"c3d82ccb-fee1-430c-949e-6c0a217c00a8\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-02-14T02:11:46.3283398Z\"}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnector.Tests.ps1 b/src/Security/Security.Autorest/test/Update-AzSecurityConnector.Tests.ps1 new file mode 100644 index 000000000000..f15273c630d0 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnector.Tests.ps1 @@ -0,0 +1,30 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSecurityConnector')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSecurityConnector.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSecurityConnector' { + It 'UpdateExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + Update-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name "dfdsdktests-azdo-01" -Tag @{ pwshsdktest="true"} + } + + It 'UpdateViaIdentityExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $connector = Get-AzSecurityConnector -SubscriptionId $sid -ResourceGroupName $rg -Name "dfdsdktests-azdo-01" + Update-AzSecurityConnector -InputObject $connector -Tag @{ pwshsdktest2="true"} + } +} diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsOrg.Recording.json b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsOrg.Recording.json new file mode 100644 index 000000000000..3a917d62ff99 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsOrg.Recording.json @@ -0,0 +1,421 @@ +{ + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"actionableRemediation\": {\r\n \"state\": \"Enabled\",\r\n \"categoryConfigurations\": [\r\n {\r\n \"minimumSeverityLevel\": \"High\",\r\n \"category\": \"IaC\"\r\n }\r\n ],\r\n \"inheritFromParentState\": \"Disabled\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "b2346265-5bb6-478f-a3c4-0ac923ee45d6" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e?api-version=2023-09-01-preview\u0026t=638434735091422662\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4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NfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b9ce3e88-cef4-4617-b96e-c24f3fbce2e5" ], + "x-ms-correlation-request-id": [ "b9ce3e88-cef4-4617-b96e-c24f3fbce2e5" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021149Z:b9ce3e88-cef4-4617-b96e-c24f3fbce2e5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 988E0142F4DB4E04B2858BA47C79E6D0 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:11:47Z" ], + "Date": [ "Wed, 14 Feb 2024 02:11:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"NotApplicable\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"}}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e?api-version=2023-09-01-preview\u0026t=638434735091422662\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpD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8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/oper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tC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "65" ], + "x-ms-client-request-id": [ "87602f19-7e64-4e27-b7af-1f1a91191662" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "f9465781-c7a6-423c-8756-67f2ead09fb4" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "d96621b1-d517-4674-8378-5225da20f1ff" ], + "x-ms-correlation-request-id": [ "d96621b1-d517-4674-8378-5225da20f1ff" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021209Z:d96621b1-d517-4674-8378-5225da20f1ff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1A1BAA8132BF42388AE5D5091B1CE999 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:12:09Z" ], + "Date": [ "Wed, 14 Feb 2024 02:12:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "333" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e\",\"name\":\"6476c158-4aac-402c-8d77-9079e881cd0e\",\"status\":\"Accepted\",\"startTime\":\"2024-02-14T02:11:48.9820006Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e?api-version=2023-09-01-preview\u0026t=638434735091422662\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4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BJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e?api-version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Q_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "66" ], + "x-ms-client-request-id": [ "87602f19-7e64-4e27-b7af-1f1a91191662" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "9d7a1d84-9060-4566-9a6d-d03d69443975" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "2f6adacf-63f1-4bd5-93de-8e61f1910657" ], + "x-ms-correlation-request-id": [ "2f6adacf-63f1-4bd5-93de-8e61f1910657" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021230Z:2f6adacf-63f1-4bd5-93de-8e61f1910657" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 69DB977039FD406184C17CE21FE0A51D Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:12:30Z" ], + "Date": [ "Wed, 14 Feb 2024 02:12:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "333" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e\",\"name\":\"6476c158-4aac-402c-8d77-9079e881cd0e\",\"status\":\"Accepted\",\"startTime\":\"2024-02-14T02:11:48.9820006Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e?api-version=2023-09-01-preview\u0026t=638434735091422662\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb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UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e?api-version=2023-09-01-preview\u0026t=638434735091422662\u0026c=MII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fzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=HAdcT2RdvtoopHE1BeQ3fjcwibSJiBKJIA0vt4lPe5QnGako9eGjBQD_lVLcwH7Lhi81EMNMJFy3jiCUYnY4VqeC8NYwZ70cEKb1_HynnvOMj3VWxtc9n1pWP6QxuYLLMjldioZ9E1SmqHWQr-FSytwwrwgCt35wAKdO1FNIGmlI9QBfZnn9iwp5OXhQtrUU6Mbw0ErlYHOTgGNNfIrtuLnBpZr5JtfQEbwwpvRPv84F0Y1mvMfGdhq-bR8vBLNxY78q1RDmqeKB3Og3wGPRXshhNja3R-4m9K5VK0210VscSfZSB-5qGS1wjhXRrc4UUqW0PUx8d0J8CP2L7ff29w\u0026h=RreXA_I2ZtEzYKZp7KNnZCDAyPefoXdqQKu4Q1j2_fY", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "67" ], + "x-ms-client-request-id": [ "87602f19-7e64-4e27-b7af-1f1a91191662" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "3dacc724-34f2-4ac1-868d-a7592110fbd7" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "fb408887-ca42-4136-8985-8f892c2fae11" ], + "x-ms-correlation-request-id": [ "fb408887-ca42-4136-8985-8f892c2fae11" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021251Z:fb408887-ca42-4136-8985-8f892c2fae11" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DE125DC39E134544A91996C6E6F7293B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:12:50Z" ], + "Date": [ "Wed, 14 Feb 2024 02:12:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "375" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/6476c158-4aac-402c-8d77-9079e881cd0e\",\"name\":\"6476c158-4aac-402c-8d77-9079e881cd0e\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:11:48.9820006Z\",\"endTime\":\"2024-02-14T02:12:31.4844247Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "68" ], + "x-ms-client-request-id": [ "87602f19-7e64-4e27-b7af-1f1a91191662" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "5f3dfc8a-bbf8-4758-94eb-44c8c91ae6de" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "86ccb3ab-d053-4396-8096-d58ad9e1165e" ], + "x-ms-correlation-request-id": [ "86ccb3ab-d053-4396-8096-d58ad9e1165e" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021252Z:86ccb3ab-d053-4396-8096-d58ad9e1165e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0DFA39DD42EC4B898A172B8917523000 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:12:51Z" ], + "Date": [ "Wed, 14 Feb 2024 02:12:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "687" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "69" ], + "x-ms-client-request-id": [ "d67e66d5-a899-45ad-9e05-70fd5f315b53" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsOrg_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "976d7ba2-7b60-453d-9719-8df17854b7e1" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "ce72034f-abac-453c-b6ca-6202cb84794e" ], + "x-ms-correlation-request-id": [ "ce72034f-abac-453c-b6ca-6202cb84794e" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021252Z:ce72034f-abac-453c-b6ca-6202cb84794e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 926C45A90E8C4A5D845165DB19F0E3BF Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:12:52Z" ], + "Date": [ "Wed, 14 Feb 2024 02:12:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "687" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"actionableRemediation\": {\r\n \"state\": \"Enabled\",\r\n \"categoryConfigurations\": [\r\n {\r\n \"minimumSeverityLevel\": \"High\",\r\n \"category\": \"IaC\"\r\n }\r\n ],\r\n \"inheritFromParentState\": \"Disabled\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "54757811-cca6-47ff-b7a4-7b483fd51fb4" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/887b62d0-95c1-45b5-8160-6751cc02b7ee?api-version=2023-09-01-preview\u0026t=638434735732829237\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5m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XGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=GUs4-L261Vvs2uspyMgqyh4h828FgKXUht2QlN9oLtScmTlUtaZRw4wlRQ__QJrQQsVMZhXDX5XgNZXqgDlaEmeSMFjkDJYtpxiSvAT2LRpfxIoLgGgoeSnDhyefOJGH-f56FMHsUkctmCZOAhGtQT4ja3DfbhmNEfFLYi2GDzd_qTT7lkCEn9l03QNvAYAW395_JEA9pPd4fl2fRmTWOfdBcfbdzuWhh3QLLWoinRkAeyLfYLGDgsVM4ANGfjyZ3EmlmGmRPG8zqt2ToTSN-Ukox9eZwKGtnUJJ-DWV0okiZawdKFcXe7GJqc_2O5IoxM6paHeIJhv_pYZJ6V32Sw\u0026h=89GpUrozmQmZsJJHDhIyDBOvxqfxlWmPKt-eGG3z3vU" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "bddd8246-f299-4e18-a70f-f995b77218ef" ], + "x-ms-correlation-request-id": [ "bddd8246-f299-4e18-a70f-f995b77218ef" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021253Z:bddd8246-f299-4e18-a70f-f995b77218ef" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54B0A776B4C942A29D28F35395F17F34 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:12:52Z" ], + "Date": [ "Wed, 14 Feb 2024 02:12:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"NotApplicable\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"}}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/887b62d0-95c1-45b5-8160-6751cc02b7ee?api-version=2023-09-01-preview\u0026t=638434735732829237\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwY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JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=GUs4-L261Vvs2uspyMgqyh4h828FgKXUht2QlN9oLtScmTlUtaZRw4wlRQ__QJrQQsVMZhXDX5XgNZXqgDlaEmeSMFjkDJYtpxiSvAT2LRpfxIoLgGgoeSnDhyefOJGH-f56FMHsUkctmCZOAhGtQT4ja3DfbhmNEfFLYi2GDzd_qTT7lkCEn9l03QNvAYAW395_JEA9pPd4fl2fRmTWOfdBcfbdzuWhh3QLLWoinRkAeyLfYLGDgsVM4ANGfjyZ3EmlmGmRPG8zqt2ToTSN-Ukox9eZwKGtnUJJ-DWV0okiZawdKFcXe7GJqc_2O5IoxM6paHeIJhv_pYZJ6V32Sw\u0026h=89GpUrozmQmZsJJHDhIyDBOvxqfxlWmPKt-eGG3z3vU+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/887b62d0-95c1-45b5-8160-6751cc02b7ee?api-version=2023-09-01-preview\u0026t=638434735732829237\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5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AQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=GUs4-L261Vvs2uspyMgqyh4h828FgKXUht2QlN9oLtScmTlUtaZRw4wlRQ__QJrQQsVMZhXDX5XgNZXqgDlaEmeSMFjkDJYtpxiSvAT2LRpfxIoLgGgoeSnDhyefOJGH-f56FMHsUkctmCZOAhGtQT4ja3DfbhmNEfFLYi2GDzd_qTT7lkCEn9l03QNvAYAW395_JEA9pPd4fl2fRmTWOfdBcfbdzuWhh3QLLWoinRkAeyLfYLGDgsVM4ANGfjyZ3EmlmGmRPG8zqt2ToTSN-Ukox9eZwKGtnUJJ-DWV0okiZawdKFcXe7GJqc_2O5IoxM6paHeIJhv_pYZJ6V32Sw\u0026h=89GpUrozmQmZsJJHDhIyDBOvxqfxlWmPKt-eGG3z3vU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "71" ], + "x-ms-client-request-id": [ "7ce74df1-c8a9-4ffa-8829-8b4419a5b3b2" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "81ecb50c-d1f0-4780-bae5-a396f5195258" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "78f27f43-5476-4e42-99ee-8a6df57e26e9" ], + "x-ms-correlation-request-id": [ "78f27f43-5476-4e42-99ee-8a6df57e26e9" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021313Z:78f27f43-5476-4e42-99ee-8a6df57e26e9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 577D986B290B455A8C656483D8887773 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:13Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "375" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/887b62d0-95c1-45b5-8160-6751cc02b7ee\",\"name\":\"887b62d0-95c1-45b5-8160-6751cc02b7ee\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:12:53.1249568Z\",\"endTime\":\"2024-02-14T02:13:06.9642761Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsOrg+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "72" ], + "x-ms-client-request-id": [ "7ce74df1-c8a9-4ffa-8829-8b4419a5b3b2" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsOrg_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "50e24984-68e5-48f7-822e-9a2af1491116" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b25b5d58-7aa5-47e9-b284-a914e5366f04" ], + "x-ms-correlation-request-id": [ "b25b5d58-7aa5-47e9-b284-a914e5366f04" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021315Z:b25b5d58-7aa5-47e9-b284-a914e5366f04" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 271A87A7A3CB40D89F695B12EEC92F36 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:13Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "687" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:31:18Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests\",\"name\":\"dfdsdktests\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsOrg.Tests.ps1 b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsOrg.Tests.ps1 new file mode 100644 index 000000000000..3c630ce08a99 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsOrg.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSecurityConnectorAzureDevOpsOrg')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSecurityConnectorAzureDevOpsOrg.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSecurityConnectorAzureDevOpsOrg' { + It 'UpdateExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) + Update-AzSecurityConnectorAzureDevOpsOrg -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ActionableRemediation $config + } + + It 'UpdateViaIdentityExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) + $org = Get-AzSecurityConnectorAzureDevOpsOrg -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" + Update-AzSecurityConnectorAzureDevOpsOrg -InputObject $org -ActionableRemediation $config + } +} diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsProject.Recording.json b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsProject.Recording.json new file mode 100644 index 000000000000..85b1b91de54e --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsProject.Recording.json @@ -0,0 +1,325 @@ +{ + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"actionableRemediation\": {\r\n \"state\": \"Enabled\",\r\n \"categoryConfigurations\": [\r\n {\r\n \"minimumSeverityLevel\": \"High\",\r\n \"category\": \"IaC\"\r\n }\r\n ],\r\n \"inheritFromParentState\": \"Disabled\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "9fd7cde7-7ba9-413e-a340-6cb551559d4c" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/01cd23ef-c58f-4a28-946b-c827b809f66b?api-version=2023-09-01-preview\u0026t=638434735966926474\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhs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0026h=s0bmA8OQ5oxWzKhe7kW2cGgXDjKAnVi2lHIuRaA6Uu4" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "9652968f-1b83-4ad2-9d0d-da929f843da5" ], + "x-ms-correlation-request-id": [ "9652968f-1b83-4ad2-9d0d-da929f843da5" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021316Z:9652968f-1b83-4ad2-9d0d-da929f843da5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 86643ECB73F9405DAD0118C11A02AAD0 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:16Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"NotApplicable\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"}}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/01cd23ef-c58f-4a28-946b-c827b809f66b?api-version=2023-09-01-preview\u0026t=638434735966926474\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5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BXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=JKG-T_DhVcRmgREOGdsjSD_P7SZ09H_8qEXMJtwt0nmqF9yDlQzwepgjpkMdN45Rpw6WAY-hb8Yn13e2byQDPxfifah3m0MkTc1MfWu36nPsSkLiScJTztHjJPf7xK1B_Bwn8y52uIehaHMQiZ0ogXtasetfSOhH4qPC_Gcz4z0uiDxtBdiU8wZUBzIXrDdOKKF7PdKMeq6nA0nzDw1DTiyj8tCbc2ytFi2xsJ3NcvUhv2DtwbzMA9jR2ysxpMC84fALzO62Tf2jJUmtzADDpkPPMJhqeojDzUqyV0600wCAuUqiFFR3gPV2MjiXpb1WK9RyEri7tq2xF-iFcGYbWw\u0026h=s0bmA8OQ5oxWzKhe7kW2cGgXDjKAnVi2lHIuRaA6Uu4+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/01cd23ef-c58f-4a28-946b-c827b809f66b?api-version=2023-09-01-preview\u0026t=638434735966926474\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHb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xfifah3m0MkTc1MfWu36nPsSkLiScJTztHjJPf7xK1B_Bwn8y52uIehaHMQiZ0ogXtasetfSOhH4qPC_Gcz4z0uiDxtBdiU8wZUBzIXrDdOKKF7PdKMeq6nA0nzDw1DTiyj8tCbc2ytFi2xsJ3NcvUhv2DtwbzMA9jR2ysxpMC84fALzO62Tf2jJUmtzADDpkPPMJhqeojDzUqyV0600wCAuUqiFFR3gPV2MjiXpb1WK9RyEri7tq2xF-iFcGYbWw\u0026h=s0bmA8OQ5oxWzKhe7kW2cGgXDjKAnVi2lHIuRaA6Uu4", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "74" ], + "x-ms-client-request-id": [ "578d1745-ee04-40d8-9fba-36332b49c041" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "3e05bde5-2cc0-41bd-9263-524588723419" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "2e1bb146-a63a-4d4f-a71d-af790642670c" ], + "x-ms-correlation-request-id": [ "2e1bb146-a63a-4d4f-a71d-af790642670c" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021337Z:2e1bb146-a63a-4d4f-a71d-af790642670c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6A775EADDA0740F09FADB2401D0343A2 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:37Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "375" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/01cd23ef-c58f-4a28-946b-c827b809f66b\",\"name\":\"01cd23ef-c58f-4a28-946b-c827b809f66b\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:13:16.4620853Z\",\"endTime\":\"2024-02-14T02:13:22.8220731Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "75" ], + "x-ms-client-request-id": [ "578d1745-ee04-40d8-9fba-36332b49c041" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "845ae8fa-eae7-496d-8939-b7d2c5d1f963" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "b98fda4a-e3c6-445a-803f-411a62d36979" ], + "x-ms-correlation-request-id": [ "b98fda4a-e3c6-445a-803f-411a62d36979" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021337Z:b98fda4a-e3c6-445a-803f-411a62d36979" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 72C630488D7A44FE948648D25EF32B38 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:37Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"161fb6f6-f2fe-4616-a627-293b788ff583\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "76" ], + "x-ms-client-request-id": [ "789ad5c6-d048-4b1c-a5be-89c8d4aafa58" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsProject_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "1db7bc47-06c8-4d91-a87d-3f12b77b3b3c" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "86525668-ae5f-4313-bd8b-f844ce0c0266" ], + "x-ms-correlation-request-id": [ "86525668-ae5f-4313-bd8b-f844ce0c0266" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021338Z:86525668-ae5f-4313-bd8b-f844ce0c0266" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8405B0532B664BF7B3A20A892E05EF9A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:38Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"161fb6f6-f2fe-4616-a627-293b788ff583\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"actionableRemediation\": {\r\n \"state\": \"Enabled\",\r\n \"categoryConfigurations\": [\r\n {\r\n \"minimumSeverityLevel\": \"High\",\r\n \"category\": \"IaC\"\r\n }\r\n ],\r\n \"inheritFromParentState\": \"Disabled\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "ff24f363-6d91-4016-a3e8-7e963b5f4f13" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/072824f9-c994-4c17-9b29-f79a44db47ce?api-version=2023-09-01-preview\u0026t=638434736195458798\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmN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ROVFrlBoRzrsRdgusfNndyLTO7LQTD1sRc0BHzb4Zd_YoKYIUrcwZJbUwpnvSwMotHO9MKhqrmZQJ47P3T38vGAU7-xF-Cj5rLznK7uBEtK5-3-wUOtaCeawZuyeEml0OJD_1uPD04nkR6FNXqaWPz9_Mv-_cmEOiWy7v2AGk-koqCkoft50GonpII83HNYR7Z7LMzGDrs-MpZ1Ksk-AxDSt9hx670QV5ZR5bde7AaRkxa1XZkewooTf2rR4WNN-kkjMVa3Sa_1L-kUvzgPSUa9P4tv2vwFu2hOPzt_L_acCmwbI7VIud4sMPUDWhhHZVQ\u0026h=KNHS5eGwM3X001poUWPc57TWZ-mPW3Of42lCsWq4Zpc" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "7d3f0d3d-0781-4bee-aa8e-4136ab62b53f" ], + "x-ms-correlation-request-id": [ "7d3f0d3d-0781-4bee-aa8e-4136ab62b53f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021339Z:7d3f0d3d-0781-4bee-aa8e-4136ab62b53f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 82E4546FA2634B72B2CDD8F679558AAB Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:38Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "281" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"NotApplicable\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"}}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/072824f9-c994-4c17-9b29-f79a44db47ce?api-version=2023-09-01-preview\u0026t=638434736195458798\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUF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BBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=ffQmXHhiuQw2T0ar4d2EROVFrlBoRzrsRdgusfNndyLTO7LQTD1sRc0BHzb4Zd_YoKYIUrcwZJbUwpnvSwMotHO9MKhqrmZQJ47P3T38vGAU7-xF-Cj5rLznK7uBEtK5-3-wUOtaCeawZuyeEml0OJD_1uPD04nkR6FNXqaWPz9_Mv-_cmEOiWy7v2AGk-koqCkoft50GonpII83HNYR7Z7LMzGDrs-MpZ1Ksk-AxDSt9hx670QV5ZR5bde7AaRkxa1XZkewooTf2rR4WNN-kkjMVa3Sa_1L-kUvzgPSUa9P4tv2vwFu2hOPzt_L_acCmwbI7VIud4sMPUDWhhHZVQ\u0026h=KNHS5eGwM3X001poUWPc57TWZ-mPW3Of42lCsWq4Zpc+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/072824f9-c994-4c17-9b29-f79a44db47ce?api-version=2023-09-01-preview\u0026t=638434736195458798\u0026c=MIIHADCCBeigAwIBAgITfARmPsJ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lKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=ffQmXHhiuQw2T0ar4d2EROVFrlBoRzrsRdgusfNndyLTO7LQTD1sRc0BHzb4Zd_YoKYIUrcwZJbUwpnvSwMotHO9MKhqrmZQJ47P3T38vGAU7-xF-Cj5rLznK7uBEtK5-3-wUOtaCeawZuyeEml0OJD_1uPD04nkR6FNXqaWPz9_Mv-_cmEOiWy7v2AGk-koqCkoft50GonpII83HNYR7Z7LMzGDrs-MpZ1Ksk-AxDSt9hx670QV5ZR5bde7AaRkxa1XZkewooTf2rR4WNN-kkjMVa3Sa_1L-kUvzgPSUa9P4tv2vwFu2hOPzt_L_acCmwbI7VIud4sMPUDWhhHZVQ\u0026h=KNHS5eGwM3X001poUWPc57TWZ-mPW3Of42lCsWq4Zpc", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "78" ], + "x-ms-client-request-id": [ "5f532eef-e7d5-4178-aea7-123badcc4118" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "c75228dd-f914-4f3e-98b8-4010ece68b68" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "21a4914f-4f29-4341-8162-eed15eaba109" ], + "x-ms-correlation-request-id": [ "21a4914f-4f29-4341-8162-eed15eaba109" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021400Z:21a4914f-4f29-4341-8162-eed15eaba109" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E8B888EDE01A49D8894D9DFE20068315 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:13:59Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "375" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/072824f9-c994-4c17-9b29-f79a44db47ce\",\"name\":\"072824f9-c994-4c17-9b29-f79a44db47ce\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:13:39.3891249Z\",\"endTime\":\"2024-02-14T02:13:58.7086708Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsProject+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "79" ], + "x-ms-client-request-id": [ "5f532eef-e7d5-4178-aea7-123badcc4118" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsProject_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "96e4df39-b618-490d-b4d9-d91d55a7afc9" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "e63656cb-4cc9-404f-b48a-99726dcc1f77" ], + "x-ms-correlation-request-id": [ "e63656cb-4cc9-404f-b48a-99726dcc1f77" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021400Z:e63656cb-4cc9-404f-b48a-99726dcc1f77" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8BB2B9998A3B4360B09529B0D7269AA5 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:00Z" ], + "Date": [ "Wed, 14 Feb 2024 02:13:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"projectId\":\"161fb6f6-f2fe-4616-a627-293b788ff583\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Disabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd\",\"name\":\"ContosoSDKDfd\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsProject.Tests.ps1 b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsProject.Tests.ps1 new file mode 100644 index 000000000000..05c6630915f5 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsProject.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSecurityConnectorAzureDevOpsProject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSecurityConnectorAzureDevOpsProject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSecurityConnectorAzureDevOpsProject' { + It 'UpdateExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) + Update-AzSecurityConnectorAzureDevOpsProject -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" -ActionableRemediation $config + } + + It 'UpdateViaIdentityExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Disabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) + $project = Get-AzSecurityConnectorAzureDevOpsProject -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" + Update-AzSecurityConnectorAzureDevOpsProject -InputObject $project -ActionableRemediation $config + } +} diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsRepo.Recording.json b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsRepo.Recording.json new file mode 100644 index 000000000000..27ec7f1a9fb9 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsRepo.Recording.json @@ -0,0 +1,373 @@ +{ + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"actionableRemediation\": {\r\n \"state\": \"Enabled\",\r\n \"categoryConfigurations\": [\r\n {\r\n \"minimumSeverityLevel\": \"High\",\r\n \"category\": \"IaC\"\r\n }\r\n ],\r\n \"inheritFromParentState\": \"Enabled\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "276" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "52595737-87b9-4478-b80c-f9ce52e6a949" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61?api-version=2023-09-01-preview\u0026t=638434736421667150\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7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0026h=xJoJ_PEd7utG2tKcQCnk71a6HkbXmNMe_2JVKyjXFdU" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "a4e0f81e-8260-4297-a37d-88bf66698c46" ], + "x-ms-correlation-request-id": [ "a4e0f81e-8260-4297-a37d-88bf66698c46" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021402Z:a4e0f81e-8260-4297-a37d-88bf66698c46" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BF8454C6F7534CD49061800BF83D49BF Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:01Z" ], + "Date": [ "Wed, 14 Feb 2024 02:14:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "280" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"NotApplicable\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"}}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61?api-version=2023-09-01-preview\u0026t=638434736421667150\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmE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akbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=AtvmxjBPTXu2um0JuBBiJ9IcC324tWcMdTVD0fHi1Scx2PTMab499Xw3g-yfK60SF03yuriW3rlortMdtj8d1BI1nBQdtlrsvRkax6ds6id1n3_tmRJUthX3ToOi5Pt2hfL07btraavcXB0Utm8ocg2te8RShF8Y5Sf1e5XX-Vv7N9lazTPN9k8hr2ibpxQVoRH_TyaQdr22M5574Mfea4oBfr0DEnBZsksDgDCtNRe8ZpACuApyxMZc3TfJpdzWw2PLoSdPboa-CVAP_9hZviYvkSdpLgfcU0PSaW8ZhbOJ59KgP8hveFd1xpfbBX2gVy69sDz5Do7_IbHsEvDS_g\u0026h=xJoJ_PEd7utG2tKcQCnk71a6HkbXmNMe_2JVKyjXFdU+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61?api-version=2023-09-01-preview\u0026t=638434736421667150\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHw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1n3_tmRJUthX3ToOi5Pt2hfL07btraavcXB0Utm8ocg2te8RShF8Y5Sf1e5XX-Vv7N9lazTPN9k8hr2ibpxQVoRH_TyaQdr22M5574Mfea4oBfr0DEnBZsksDgDCtNRe8ZpACuApyxMZc3TfJpdzWw2PLoSdPboa-CVAP_9hZviYvkSdpLgfcU0PSaW8ZhbOJ59KgP8hveFd1xpfbBX2gVy69sDz5Do7_IbHsEvDS_g\u0026h=xJoJ_PEd7utG2tKcQCnk71a6HkbXmNMe_2JVKyjXFdU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "81" ], + "x-ms-client-request-id": [ "78142230-db30-4946-af09-371522f20031" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "2cd0b6ad-a148-4e51-b0b1-13f0c14416ba" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "30132605-4610-4b0a-b27f-07f04d352a33" ], + "x-ms-correlation-request-id": [ "30132605-4610-4b0a-b27f-07f04d352a33" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021422Z:30132605-4610-4b0a-b27f-07f04d352a33" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 88FB6BAEFD964E459F58FCF3E45A487D Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:22Z" ], + "Date": [ "Wed, 14 Feb 2024 02:14:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "333" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61\",\"name\":\"43b6a033-5ab4-436f-86a2-3f7033f39a61\",\"status\":\"Accepted\",\"startTime\":\"2024-02-14T02:14:02.0239148Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61?api-version=2023-09-01-preview\u0026t=638434736421667150\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAY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J81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=AtvmxjBPTXu2um0JuBBiJ9IcC324tWcMdTVD0fHi1Scx2PTMab499Xw3g-yfK60SF03yuriW3rlortMdtj8d1BI1nBQdtlrsvRkax6ds6id1n3_tmRJUthX3ToOi5Pt2hfL07btraavcXB0Utm8ocg2te8RShF8Y5Sf1e5XX-Vv7N9lazTPN9k8hr2ibpxQVoRH_TyaQdr22M5574Mfea4oBfr0DEnBZsksDgDCtNRe8ZpACuApyxMZc3TfJpdzWw2PLoSdPboa-CVAP_9hZviYvkSdpLgfcU0PSaW8ZhbOJ59KgP8hveFd1xpfbBX2gVy69sDz5Do7_IbHsEvDS_g\u0026h=xJoJ_PEd7utG2tKcQCnk71a6HkbXmNMe_2JVKyjXFdU+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61?api-version=2023-09-01-preview\u0026t=638434736421667150\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJo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7N9lazTPN9k8hr2ibpxQVoRH_TyaQdr22M5574Mfea4oBfr0DEnBZsksDgDCtNRe8ZpACuApyxMZc3TfJpdzWw2PLoSdPboa-CVAP_9hZviYvkSdpLgfcU0PSaW8ZhbOJ59KgP8hveFd1xpfbBX2gVy69sDz5Do7_IbHsEvDS_g\u0026h=xJoJ_PEd7utG2tKcQCnk71a6HkbXmNMe_2JVKyjXFdU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "82" ], + "x-ms-client-request-id": [ "78142230-db30-4946-af09-371522f20031" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "8afe6371-f820-46e7-b221-f52dc3fc802b" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "fd0de110-c522-4963-8f76-98aa0c0c00be" ], + "x-ms-correlation-request-id": [ "fd0de110-c522-4963-8f76-98aa0c0c00be" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021443Z:fd0de110-c522-4963-8f76-98aa0c0c00be" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C149135F2FC84E10AF97C3CE4F8D8BEB Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:43Z" ], + "Date": [ "Wed, 14 Feb 2024 02:14:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "375" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/43b6a033-5ab4-436f-86a2-3f7033f39a61\",\"name\":\"43b6a033-5ab4-436f-86a2-3f7033f39a61\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:14:02.0239148Z\",\"endTime\":\"2024-02-14T02:14:32.7218931Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "83" ], + "x-ms-client-request-id": [ "78142230-db30-4946-af09-371522f20031" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "f7b6c24b-b647-48a8-8664-950b5d72efe7" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "80e90634-8290-4e92-aaeb-cdce1cfa085f" ], + "x-ms-correlation-request-id": [ "80e90634-8290-4e92-aaeb-cdce1cfa085f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021443Z:80e90634-8290-4e92-aaeb-cdce1cfa085f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 94544801301845A4879064663D2D9792 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:43Z" ], + "Date": [ "Wed, 14 Feb 2024 02:14:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "924" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"77c1e69a-41a5-4de7-8b9c-0acab45f5bca\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp2\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2\",\"name\":\"TestApp2\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "84" ], + "x-ms-client-request-id": [ "91129a75-69dc-44e5-b789-c5f41151bb87" ], + "CommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Get-AzSecurityConnectorAzureDevOpsRepo_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "20b48edd-c229-4c24-829e-d86019a20c39" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "73066d75-a321-46e9-b2d8-b767bc0f4908" ], + "x-ms-correlation-request-id": [ "73066d75-a321-46e9-b2d8-b767bc0f4908" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021444Z:73066d75-a321-46e9-b2d8-b767bc0f4908" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5F4D40C6FA9C421890EAA2947BEC8B78 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:44Z" ], + "Date": [ "Wed, 14 Feb 2024 02:14:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "924" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"77c1e69a-41a5-4de7-8b9c-0acab45f5bca\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp2\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2\",\"name\":\"TestApp2\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"actionableRemediation\": {\r\n \"state\": \"Enabled\",\r\n \"categoryConfigurations\": [\r\n {\r\n \"minimumSeverityLevel\": \"High\",\r\n \"category\": \"IaC\"\r\n }\r\n ],\r\n \"inheritFromParentState\": \"Enabled\"\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "276" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "1ce4aebb-1f6e-4e5f-aac5-253a2af9338c" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/a3f54152-359a-44d0-889b-af0d797ee7d0?api-version=2023-09-01-preview\u0026t=638434736852271315\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgw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IOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=f1m3iLLFE5alrEFCCW-0oVn8Pbh6DCoBjvZIlMBgCLo5Xoh1Vt58lKv8nAucuVZ8SZdUmY6L_a0DwHNyCkiWKyzno2LHnd6H7B7sn2fdQyIO5ffAA9iUNBP1Q_FmkFeetFUmfJwPP6pYF8je0-3exBpicxcF_7wr_ZSrutYCc6jfSGlGHSeWo1QPI7Bbm_NzJ3Vx8wicawqwYRdsnhzDEfIrIB8DQnVpBwuRViJWP3LLCzS1nElhEkAuq5MaO63ALXdL7hKkEJB5ROMyDIDNRoElaNZlEMOo8qhBfaIcKVTODM07q80ApqYgmzIOz3yBDh6xzh7M2JGjHqUXZZVA_g\u0026h=xtiUzOVWhdeSBRLVJLDJ0Na36Ed7F8y-Cl8eCQdR-So" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "ade0fd5e-6fad-44aa-b310-1c9fb52b596a" ], + "x-ms-correlation-request-id": [ "ade0fd5e-6fad-44aa-b310-1c9fb52b596a" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021445Z:ade0fd5e-6fad-44aa-b310-1c9fb52b596a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DAD749970A6543469D1191467C581E48 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:14:44Z" ], + "Date": [ "Wed, 14 Feb 2024 02:14:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "280" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"onboardingState\":\"NotApplicable\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"}}}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/a3f54152-359a-44d0-889b-af0d797ee7d0?api-version=2023-09-01-preview\u0026t=638434736852271315\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBg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/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/a3f54152-359a-44d0-889b-af0d797ee7d0?api-version=2023-09-01-preview\u0026t=638434736852271315\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20v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YeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=f1m3iLLFE5alrEFCCW-0oVn8Pbh6DCoBjvZIlMBgCLo5Xoh1Vt58lKv8nAucuVZ8SZdUmY6L_a0DwHNyCkiWKyzno2LHnd6H7B7sn2fdQyIO5ffAA9iUNBP1Q_FmkFeetFUmfJwPP6pYF8je0-3exBpicxcF_7wr_ZSrutYCc6jfSGlGHSeWo1QPI7Bbm_NzJ3Vx8wicawqwYRdsnhzDEfIrIB8DQnVpBwuRViJWP3LLCzS1nElhEkAuq5MaO63ALXdL7hKkEJB5ROMyDIDNRoElaNZlEMOo8qhBfaIcKVTODM07q80ApqYgmzIOz3yBDh6xzh7M2JGjHqUXZZVA_g\u0026h=xtiUzOVWhdeSBRLVJLDJ0Na36Ed7F8y-Cl8eCQdR-So", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "86" ], + "x-ms-client-request-id": [ "eea58c8b-3a78-4948-b6d2-4315fa60a41b" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "941f39a4-a226-4177-b791-d9e70055c28e" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "97e47fae-fe99-453b-ad05-9dacb919bea3" ], + "x-ms-correlation-request-id": [ "97e47fae-fe99-453b-ad05-9dacb919bea3" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021505Z:97e47fae-fe99-453b-ad05-9dacb919bea3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 590D9708D4B9419BAB6C6C0919222350 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:05Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "375" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/a3f54152-359a-44d0-889b-af0d797ee7d0\",\"name\":\"a3f54152-359a-44d0-889b-af0d797ee7d0\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:14:45.0906399Z\",\"endTime\":\"2024-02-14T02:14:45.7387043Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorAzureDevOpsRepo+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "87" ], + "x-ms-client-request-id": [ "eea58c8b-3a78-4948-b6d2-4315fa60a41b" ], + "CommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo" ], + "FullCommandName": [ "Update-AzSecurityConnectorAzureDevOpsRepo_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "31fe5b81-c40e-45fa-8db8-8f95d0a9d702" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "1dfa8bfc-5bf0-457c-8d0d-90011c6ec79e" ], + "x-ms-correlation-request-id": [ "1dfa8bfc-5bf0-457c-8d0d-90011c6ec79e" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021506Z:1dfa8bfc-5bf0-457c-8d0d-90011c6ec79e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6ABDF5642AE245CBA695C4BFA47CE05B Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:06Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "924" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"parentOrgName\":\"dfdsdktests\",\"parentProjectName\":\"ContosoSDKDfd\",\"repoId\":\"77c1e69a-41a5-4de7-8b9c-0acab45f5bca\",\"repoUrl\":\"https://dev.azure.com/dfdsdktests/ContosoSDKDfd/_git/TestApp2\",\"onboardingState\":\"Onboarded\",\"actionableRemediation\":{\"state\":\"Enabled\",\"categoryConfigurations\":[{\"minimumSeverityLevel\":\"High\",\"category\":\"IaC\"}],\"branchConfiguration\":{\"branchNames\":[],\"annotateDefaultBranch\":\"Enabled\"},\"inheritFromParentState\":\"Enabled\"},\"provisioningStatusMessage\":\"OK\",\"provisioningStatusUpdateTimeUtc\":\"2024-02-14T00:34:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/azureDevOpsOrgs/dfdsdktests/projects/ContosoSDKDfd/repos/TestApp2\",\"name\":\"TestApp2\",\"type\":\"Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsRepo.Tests.ps1 b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsRepo.Tests.ps1 new file mode 100644 index 000000000000..5266aeb62de7 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorAzureDevOpsRepo.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSecurityConnectorAzureDevOpsRepo')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSecurityConnectorAzureDevOpsRepo.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSecurityConnectorAzureDevOpsRepo' { + It 'UpdateExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Enabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) + Update-AzSecurityConnectorAzureDevOpsRepo -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" -RepoName "TestApp2" -ActionableRemediation $config + } + + It 'UpdateViaIdentityExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + + $config = New-AzSecurityConnectorActionableRemediationObject -State Enabled -InheritFromParentState Enabled -CategoryConfiguration @( @{category="IaC"; minimumSeverityLevel="High"}) + $repo = Get-AzSecurityConnectorAzureDevOpsRepo -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -OrgName "dfdsdktests" -ProjectName "ContosoSDKDfd" -RepoName "TestApp2" + Update-AzSecurityConnectorAzureDevOpsRepo -InputObject $repo -ActionableRemediation $config + } +} diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorDevOpsConfiguration.Recording.json b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorDevOpsConfiguration.Recording.json new file mode 100644 index 000000000000..23335004d946 --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorDevOpsConfiguration.Recording.json @@ -0,0 +1,325 @@ +{ + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"autoDiscovery\": \"Disabled\",\r\n \"topLevelInventoryList\": [ \"dfdsdktests\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "110" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "5e923fca-8c4c-437c-8558-1fcb78ecbd49" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/638e559a-5dc1-4f12-a066-2948a2664a1c?api-version=2023-09-01-preview\u0026t=638434737084147492\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GP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Ot-akr7NAJXmB2ghlCvzR5ibIRe2HiiaL1s-tqR4QoKzHrIl0IDhCPNJXm_0_ffvfbEmKEOeKXv1wo1wEpo7MnaR2Wg675b8BN7iMLQwHLeynjhbA5t1Wwfke-2b2Las9Q_mvkqVht49lCH1pGH7MYXuGrBGRhfjrBj32h5jo_7CfbMO-R3bd1w\u0026h=pFrPXVZRiU8fEMj8ZO0p2TsmTpktlNuqRRxnXwI09CU" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "3a48ad70-39a5-432f-a1eb-22fcd5342ce1" ], + "x-ms-correlation-request-id": [ "3a48ad70-39a5-432f-a1eb-22fcd5342ce1" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021508Z:3a48ad70-39a5-432f-a1eb-22fcd5342ce1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 28E92D8D8CDF4504BDED74E22206353C Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:06Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "363" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"topLevelInventoryList\":[\"dfdsdktests\"],\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/638e559a-5dc1-4f12-a066-2948a2664a1c?api-version=2023-09-01-preview\u0026t=638434737084147492\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElu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KoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=XQZyoiarm9D3H32uXvdVilxkcuYqpW3OSlthIWn4iJli7iFKSiYW-8jDSXZSGhZnSH2IqL_9Wd9JKxGQ10z69e3xHxkovCwKD7czsqEz4aNsj8bNFprxhR0RrCRoumyXRio5Zapm4AyVrOsBK-Q46LgHeMqZNLlOt-akr7NAJXmB2ghlCvzR5ibIRe2HiiaL1s-tqR4QoKzHrIl0IDhCPNJXm_0_ffvfbEmKEOeKXv1wo1wEpo7MnaR2Wg675b8BN7iMLQwHLeynjhbA5t1Wwfke-2b2Las9Q_mvkqVht49lCH1pGH7MYXuGrBGRhfjrBj32h5jo_7CfbMO-R3bd1w\u0026h=pFrPXVZRiU8fEMj8ZO0p2TsmTpktlNuqRRxnXwI09CU+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/638e559a-5dc1-4f12-a066-2948a2664a1c?api-version=2023-09-01-preview\u0026t=638434737084147492\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgw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IOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=XQZyoiarm9D3H32uXvdVilxkcuYqpW3OSlthIWn4iJli7iFKSiYW-8jDSXZSGhZnSH2IqL_9Wd9JKxGQ10z69e3xHxkovCwKD7czsqEz4aNsj8bNFprxhR0RrCRoumyXRio5Zapm4AyVrOsBK-Q46LgHeMqZNLlOt-akr7NAJXmB2ghlCvzR5ibIRe2HiiaL1s-tqR4QoKzHrIl0IDhCPNJXm_0_ffvfbEmKEOeKXv1wo1wEpo7MnaR2Wg675b8BN7iMLQwHLeynjhbA5t1Wwfke-2b2Las9Q_mvkqVht49lCH1pGH7MYXuGrBGRhfjrBj32h5jo_7CfbMO-R3bd1w\u0026h=pFrPXVZRiU8fEMj8ZO0p2TsmTpktlNuqRRxnXwI09CU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "89" ], + "x-ms-client-request-id": [ "d6abcced-099b-46f4-9016-2fafc441a640" ], + "CommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "6ae09bc9-0d88-4b75-a7f1-abe2dad33257" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "22cb9c22-b8f2-4829-aece-2cad319485a7" ], + "x-ms-correlation-request-id": [ "22cb9c22-b8f2-4829-aece-2cad319485a7" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021528Z:22cb9c22-b8f2-4829-aece-2cad319485a7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 08859B2AED4C4008BD48E7F1B09D668F Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:28Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "374" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/638e559a-5dc1-4f12-a066-2948a2664a1c\",\"name\":\"638e559a-5dc1-4f12-a066-2948a2664a1c\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:15:07.382047Z\",\"endTime\":\"2024-02-14T02:15:26.7216856Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "90" ], + "x-ms-client-request-id": [ "d6abcced-099b-46f4-9016-2fafc441a640" ], + "CommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=b0d653e3d2c4fba6e75578139341b84b35dee63a8a317f007b2447d8196b79e5;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "2b9c2350-0859-467b-89fb-55c7215aba21" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "fa92015f-37d1-45cb-9532-8dd4a3206b0a" ], + "x-ms-correlation-request-id": [ "fa92015f-37d1-45cb-9532-8dd4a3206b0a" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021529Z:fa92015f-37d1-45cb-9532-8dd4a3206b0a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5E235861BA54459387D4562935121D03 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:29Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "408" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"centralus\",\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"provisioningStatusMessage\":\"Resource creation successful.\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "91" ], + "x-ms-client-request-id": [ "999896e1-83ee-4d8d-817e-fd107bc4dc05" ], + "CommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Get-AzSecurityConnectorDevOpsConfiguration_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=ca594a79766484e25889904bf326227201e6905138dd325ca221b8b7af91ccae;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "94090c18-c145-4c1d-8632-976b23cceb0c" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "256cf873-6dce-4735-8db4-1ce3645d8d04" ], + "x-ms-correlation-request-id": [ "256cf873-6dce-4735-8db4-1ce3645d8d04" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021531Z:256cf873-6dce-4735-8db4-1ce3645d8d04" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8CDC411A42234EBD8C7317C681A92C6F Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:29Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "408" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"centralus\",\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"provisioningStatusMessage\":\"Resource creation successful.\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": "{\r\n \"properties\": {\r\n \"autoDiscovery\": \"Disabled\",\r\n \"topLevelInventoryList\": [ \"dfdsdktests\" ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "110" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Set-Cookie": [ "ARRAffinity=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=1c6c7a0a18efcd0c1f62ff61ff05f8a61bfe22533cfce5122cfd179979045df0;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "37044dbc-dc89-45d0-9006-8233889ad857" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/9bc80ced-f29c-48e1-be02-4309be376db9?api-version=2023-09-01-preview\u0026t=638434737319554106\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3J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HSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=NgwoMJGnEBmNHXOCesmkJR5OOmpd0oAQMixo177FE7lxVKjRNRH-aX70Yx-Z1EUiy6uLtrua8bUDDLZQBmdh8fxpFiXV5je64KXji9MKVm6Xc3jg4AwobLiyQjm1VTJ9Qst_iHi7RVr5SaZKey8h0h4419BHG75-473jdDxJBGwmonZa5jr-z2Ta6WPDRXi1QY1wTjz6CyzskXQS4Vq7CmpSeViESzryR3Mm3K1O_dAEaiLi9qUjKSjM9lqgAZYxiMy2yyC2ZSSD1wTlZepG6kBnEgSYDhctg47E49u8zdgFvgYdJbZ1n7-QUUv_frU-fGnxd5rISMqDhFco3Zhzig\u0026h=mJGr4ykwJcZp6NzjLNjCE195H0OQHI5fzz2PPjohC24" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "5a75f2a4-2f67-4011-bcd9-309071f7e532" ], + "x-ms-correlation-request-id": [ "5a75f2a4-2f67-4011-bcd9-309071f7e532" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021531Z:5a75f2a4-2f67-4011-bcd9-309071f7e532" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 41DDD162BCF444E0A6C78C7D920A003A Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:31Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "363" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"topLevelInventoryList\":[\"dfdsdktests\"],\"provisioningState\":\"Pending\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/9bc80ced-f29c-48e1-be02-4309be376db9?api-version=2023-09-01-preview\u0026t=638434737319554106\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2b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AwobLiyQjm1VTJ9Qst_iHi7RVr5SaZKey8h0h4419BHG75-473jdDxJBGwmonZa5jr-z2Ta6WPDRXi1QY1wTjz6CyzskXQS4Vq7CmpSeViESzryR3Mm3K1O_dAEaiLi9qUjKSjM9lqgAZYxiMy2yyC2ZSSD1wTlZepG6kBnEgSYDhctg47E49u8zdgFvgYdJbZ1n7-QUUv_frU-fGnxd5rISMqDhFco3Zhzig\u0026h=mJGr4ykwJcZp6NzjLNjCE195H0OQHI5fzz2PPjohC24+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/9bc80ced-f29c-48e1-be02-4309be376db9?api-version=2023-09-01-preview\u0026t=638434737319554106\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7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zig\u0026h=mJGr4ykwJcZp6NzjLNjCE195H0OQHI5fzz2PPjohC24", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "93" ], + "x-ms-client-request-id": [ "f7c8a96b-ed20-437e-809d-280096033049" ], + "CommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "20" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "b3d2e6a6-fd7d-4b44-b636-5764ee6157eb" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "bb31a217-9eef-4749-b223-fc7db9017abb" ], + "x-ms-correlation-request-id": [ "bb31a217-9eef-4749-b223-fc7db9017abb" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021552Z:bb31a217-9eef-4749-b223-fc7db9017abb" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 93D3320C644E41B5B98BF9E26C4364C3 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:52Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "374" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default/operationResults/9bc80ced-f29c-48e1-be02-4309be376db9\",\"name\":\"9bc80ced-f29c-48e1-be02-4309be376db9\",\"status\":\"Succeeded\",\"startTime\":\"2024-02-14T02:15:31.8311342Z\",\"endTime\":\"2024-02-14T02:15:33.744497Z\"}", + "isContentBase64": false + } + }, + "Update-AzSecurityConnectorDevOpsConfiguration+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default?api-version=2023-09-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "94" ], + "x-ms-client-request-id": [ "f7c8a96b-ed20-437e-809d-280096033049" ], + "CommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration" ], + "FullCommandName": [ "Update-AzSecurityConnectorDevOpsConfiguration_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v11.0.0", "PSVersion/v7.3.11", "Az.Security/1.5.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "Set-Cookie": [ "ARRAffinity=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com", "ARRAffinitySameSite=14a5c7981ca45a6803ac375748e68dc9b495d4e56b3202b86256249c9784b400;Path=/;HttpOnly;SameSite=None;Secure;Domain=dfduserrp-centralus.dfd.security.azure.com" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "Request-Context": [ "appId=cid-v1:b8e19897-bfe4-49ad-ad76-b9526fa18eea" ], + "mise-correlation-id": [ "e3ccc4a0-a89b-4bb9-bfe9-dd75b70b7fcf" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-request-id": [ "65285a4d-2b25-4370-8144-8892351be7a0" ], + "x-ms-correlation-request-id": [ "65285a4d-2b25-4370-8144-8892351be7a0" ], + "x-ms-routing-request-id": [ "WESTUS2:20240214T021553Z:65285a4d-2b25-4370-8144-8892351be7a0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2A0154DDA6D64B628DD7C664E16907E4 Ref B: CO6AA3150220037 Ref C: 2024-02-14T02:15:53Z" ], + "Date": [ "Wed, 14 Feb 2024 02:15:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "408" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"centralus\",\"tags\":{},\"properties\":{\"autoDiscovery\":\"Disabled\",\"provisioningStatusMessage\":\"Resource creation successful.\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/487bb485-b5b0-471e-9c0d-10717612f869/resourceGroups/dfdtest-sdk/providers/Microsoft.Security/securityConnectors/dfdsdktests-azdo-01/devops/default\",\"name\":\"default\",\"type\":\"Microsoft.Security/securityConnectors/devops\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/Update-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 new file mode 100644 index 000000000000..09d87670cb3e --- /dev/null +++ b/src/Security/Security.Autorest/test/Update-AzSecurityConnectorDevOpsConfiguration.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzSecurityConnectorDevOpsConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzSecurityConnectorDevOpsConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzSecurityConnectorDevOpsConfiguration' { + It 'UpdateExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + + $devops = Update-AzSecurityConnectorDevOpsConfiguration -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" -AutoDiscovery Disabled -TopLevelInventoryList @("dfdsdktests") + $devops.AutoDiscovery | Should -Be "Disabled" + } + + It 'UpdateViaIdentityExpanded' { + $rg = $env.SecurityConnectorsResourceGroupName + $sid = $env.SubscriptionId + + $devops = Get-AzSecurityConnectorDevOpsConfiguration -SubscriptionId $sid -ResourceGroupName $rg -SecurityConnectorName "dfdsdktests-azdo-01" + Update-AzSecurityConnectorDevOpsConfiguration -InputObject $devops -AutoDiscovery Disabled -TopLevelInventoryList @("dfdsdktests") + } +} diff --git a/src/Security/Security.Autorest/test/env.json b/src/Security/Security.Autorest/test/env.json new file mode 100644 index 000000000000..7f59a9df2644 --- /dev/null +++ b/src/Security/Security.Autorest/test/env.json @@ -0,0 +1,6 @@ +{ + "SecurityConnectorsResourceGroupName": "dfdtest-sdk", + "SubscriptionId": "487bb485-b5b0-471e-9c0d-10717612f869", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "ApiCollectionsResourceGroupName": "apicollectionstests" +} diff --git a/src/Security/Security.Autorest/test/loadEnv.ps1 b/src/Security/Security.Autorest/test/loadEnv.ps1 new file mode 100644 index 000000000000..5f079e89615e --- /dev/null +++ b/src/Security/Security.Autorest/test/loadEnv.ps1 @@ -0,0 +1,29 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/Security/Security.Autorest/test/utils.ps1 b/src/Security/Security.Autorest/test/utils.ps1 new file mode 100644 index 000000000000..f8497fbd7da0 --- /dev/null +++ b/src/Security/Security.Autorest/test/utils.ps1 @@ -0,0 +1,56 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + diff --git a/src/Security/Security.Autorest/utils/Unprotect-SecureString.ps1 b/src/Security/Security.Autorest/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/src/Security/Security.Autorest/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file