From e905eeb00a38d068f6eef49b462d627f0f83395d Mon Sep 17 00:00:00 2001 From: Arjun Mohammed Date: Tue, 28 May 2024 18:10:48 -0600 Subject: [PATCH] Microsoft.Security 2024-05-15-preview DevOps Policy (#28765) * Adds base for updating Microsoft.Security from version stable/2024-04-01 to version 2024-05-15-preview * Updates readme * Updates API version in new specs and examples * update examples + swagger and rollback readme with relevant suppressions * supressions + NOT_LATEST_API_VERSION_IN_DEFAULT_TAG issue * remove GA version * policy changes * move to v5 + rename property * fix examples after rename * linter warnings * arm requested changes * use simpler example * pr comments * read only comments --- ...CreateOrUpdateAzureDevOpsOrgs_example.json | 51 + ...teOrUpdateAzureDevOpsProjects_example.json | 56 + ...reateOrUpdateAzureDevOpsRepos_example.json | 59 + ...ationsOnboardCurrentAndFuture_example.json | 56 + ...figurationsOnboardCurrentOnly_example.json | 56 + ...ConfigurationsOnboardSelected_example.json | 64 + ...UpdateDevOpsPolicyAssignments_example.json | 63 + .../DeleteDevOpsConfigurations_example.json | 21 + ...DeleteDevOpsPolicyAssignments_example.json | 19 + .../GetAzureDevOpsOrgs_example.json | 26 + .../GetAzureDevOpsProjects_example.json | 29 + .../GetAzureDevOpsRepos_example.json | 31 + ...onfigurationsWithCapabilities_example.json | 28 + .../GetDevOpsConfigurations_example.json | 22 + ...tDevOpsOperationResultsFailed_example.json | 26 + ...vOpsOperationResultsSucceeded_example.json | 22 + .../GetDevOpsPolicies_example.json | 28 + .../GetDevOpsPolicyAssignments_example.json | 30 + .../GetGitHubOwners_example.json | 24 + .../GetGitHubRepos_example.json | 28 + .../GetGitLabGroups_example.json | 25 + .../GetGitLabProjects_example.json | 27 + .../ListAvailableAzureDevOpsOrgs_example.json | 52 + .../ListAvailableGitHubOwners_example.json | 46 + .../ListAvailableGitLabGroups_example.json | 49 + .../ListAzureDevOpsOrgs_example.json | 29 + .../ListAzureDevOpsProjects_example.json | 32 + .../ListAzureDevOpsRepos_example.json | 34 + .../ListDevOpsConfigurations_example.json | 26 + .../ListDevOpsPolicies_example.json | 31 + .../ListDevOpsPolicyAssignments_example.json | 33 + .../ListGitHubOwners_example.json | 27 + .../ListGitHubRepos_example.json | 31 + .../ListGitLabGroups_example.json | 28 + .../ListGitLabProjects_example.json | 30 + .../ListGitLabSubgroups_example.json | 29 + .../UpdateAzureDevOpsOrgs_example.json | 51 + .../UpdateAzureDevOpsProjects_example.json | 56 + .../UpdateAzureDevOpsRepos_example.json | 59 + .../UpdateDevOpsConfigurations_example.json | 40 + ...UpdateDevOpsPolicyAssignments_example.json | 63 + .../securityConnectorsDevOps.json | 3246 +++++++++++++++++ .../security/resource-manager/readme.md | 26 +- 43 files changed, 4806 insertions(+), 3 deletions(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsPolicyAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsPolicyAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurationsWithCapabilities_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicies_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicyAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsConfigurations_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicies_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicyAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsPolicyAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/securityConnectorsDevOps.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json new file mode 100644 index 000000000000..28d727dc5d12 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "azureDevOpsOrg": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "Enabled" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "None" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json new file mode 100644 index 000000000000..69f0e441f1a9 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "azureDevOpsProject": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "Enabled" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "projectId": "9ebbed8f-a9cc-405f-a647-b235e22179de", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject", + "name": "myAzDevOpsProject", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "projectId": "9ebbed8f-a9cc-405f-a647-b235e22179de", + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "None" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject", + "name": "myAzDevOpsProject", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json new file mode 100644 index 000000000000..0b421c80754c --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "repoName": "myAzDevOpsRepo", + "azureDevOpsRepository": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "Enabled" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "parentProjectName": "myAzDevOpsProject", + "repoId": "cb64ab91-c9ba-46df-b44c-c769358bccdf", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo", + "name": "myAzDevOpsRepo", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "parentProjectName": "myAzDevOpsProject", + "repoId": "cb64ab91-c9ba-46df-b44c-c769358bccdf", + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "None" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo", + "name": "myAzDevOpsRepo", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json new file mode 100644 index 000000000000..93e68ffe00db --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "devOpsConfiguration": { + "properties": { + "authorization": { + "code": "00000000000000000000" + }, + "autoDiscovery": "Enabled" + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "autoDiscovery": "Enabled", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json new file mode 100644 index 000000000000..cae33e6be00d --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "devOpsConfiguration": { + "properties": { + "authorization": { + "code": "00000000000000000000" + }, + "autoDiscovery": "Disabled" + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "autoDiscovery": "Disabled", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json new file mode 100644 index 000000000000..fbae634783fc --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "devOpsConfiguration": { + "properties": { + "authorization": { + "code": "00000000000000000000" + }, + "autoDiscovery": "Disabled", + "topLevelInventoryList": [ + "org1", + "org2" + ] + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "autoDiscovery": "Disabled", + "topLevelInventoryList": [ + "org1", + "org2" + ], + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsPolicyAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsPolicyAssignments_example.json new file mode 100644 index 000000000000..5a60fbdc8a15 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsPolicyAssignments_example.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "policyAssignmentId": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "devOpsPolicyAssignment": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policyAssignments/5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "name": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "type": "Microsoft.Security/securityConnectors/devops/policyAssignments" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policyAssignments/5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "name": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "type": "Microsoft.Security/securityConnectors/devops/policyAssignments" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json new file mode 100644 index 000000000000..818e894799b7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {} + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + } + }, + "204": { + "headers": {} + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsPolicyAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsPolicyAssignments_example.json new file mode 100644 index 000000000000..927440e9fc5e --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsPolicyAssignments_example.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "policyAssignmentId": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "api-version": "2024-05-15-preview" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + } + }, + "204": { + "headers": {} + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json new file mode 100644 index 000000000000..c6718975e498 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json new file mode 100644 index 000000000000..088299050bfd --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "projectId": "9ebbed8f-a9cc-405f-a647-b235e22179de", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject", + "name": "myAzDevOpsProject", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json new file mode 100644 index 000000000000..ada1660f82bd --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "repoName": "myAzDevOpsRepo", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "parentProjectName": "myAzDevOpsProject", + "repoId": "cb64ab91-c9ba-46df-b44c-c769358bccdf", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo", + "name": "myAzDevOpsRepo", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurationsWithCapabilities_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurationsWithCapabilities_example.json new file mode 100644 index 000000000000..df3a0303de44 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurationsWithCapabilities_example.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "autoDiscovery": "Enabled", + "capabilities": [ + { + "name": "DCSPM_ENABLED", + "value": "true" + } + ], + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json new file mode 100644 index 000000000000..79bb1e8cfb44 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "autoDiscovery": "Enabled", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json new file mode 100644 index 000000000000..3cf3b2323aea --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "operationResultId": "8d4caace-e7b3-4b3e-af99-73f76829ebcf", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/8d4caace-e7b3-4b3e-af99-73f76829ebcf?api-version=2024-05-15-preview", + "name": "8d4caace-e7b3-4b3e-af99-73f76829ebcf", + "status": "Failed", + "startTime": "2023-06-21T03:23:15Z", + "endTime": "2023-06-21T03:25:15Z", + "percentComplete": 100, + "error": { + "code": "TokenExchangeFailed", + "message": "AzureDevOps OAuth token exchange failed" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json new file mode 100644 index 000000000000..396f515b4463 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "operationResultId": "4e826cf1-5c36-4808-a7d2-fb4f5170978b", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview", + "name": "4e826cf1-5c36-4808-a7d2-fb4f5170978b", + "status": "Succeeded", + "startTime": "2023-06-21T03:23:15Z", + "endTime": "2023-06-21T03:25:15Z", + "percentComplete": 100 + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicies_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicies_example.json new file mode 100644 index 000000000000..3d0779ea06cc --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicies_example.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "policyName": "myDevOpsPolicy", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "source": "BuiltIn", + "policyId": "00000000-0000-0000-0000-000000000000", + "webUrl": "https://dev.azure.com/contoso/myPolicy", + "version": "1,0", + "type": "Pipeline", + "content": "JSON string of the policy content", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policies/myDevOpsPolicy", + "name": "myDevOpsPolicy", + "type": "Microsoft.Security/securityConnectors/devops/policies" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicyAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicyAssignments_example.json new file mode 100644 index 000000000000..d214ccd29a4a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetDevOpsPolicyAssignments_example.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "policyAssignmentId": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policyAssignments/5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "name": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "type": "Microsoft.Security/securityConnectors/devops/policyAssignments" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json new file mode 100644 index 000000000000..7edc36c633a7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "ownerName": "myGitHubOwner", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "ownerUrl": "https://github.com/myGitHubOwner", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner", + "name": "myGitHubOwner", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json new file mode 100644 index 000000000000..67a1de4b5ce2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "ownerName": "myGitHubOwner", + "repoName": "myGitHubRepo", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "repoName": "myGitHubRepo", + "repoFullName": "myGitHubOwner/myGitHubRepo", + "onboardingState": "Onboarded", + "repoUrl": "https://github.com/myGitHubOwner/myGitHubRepo", + "parentOwnerName": "myGitHubOwner", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner/repos/myGitHubRepo", + "name": "myGitHubRepo", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners/repos" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json new file mode 100644 index 000000000000..7699b165286d --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "groupFQName": "myGitLabGroup$mySubGroup", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "fullyQualifiedName": "myGitLabGroup$mySubGroup", + "url": "https://gitlab.example.com/myGitLabGroup/mySubGroup", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup", + "name": "myGitLabGroup$mySubGroup", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json new file mode 100644 index 000000000000..982ed0ce6647 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "groupFQName": "myGitLabGroup$mySubGroup", + "projectName": "myGitLabProject", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "fullyQualifiedName": "myGitLabGroup$mySubGroup$myGitLabProject", + "fullyQualifiedParentGroupName": "myGitLabGroup$mySubGroup", + "url": "https://gitlab.example.com/myGitLabGroup/mySubGroup/myGitLabProject", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup/projects/myGitLabProject", + "name": "myGitLabProject", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups/projects" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json new file mode 100644 index 000000000000..750428addf34 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + }, + { + "properties": { + "onboardingState": "OnboardedByOtherConnector", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/anotherOrg", + "name": "anotherOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + }, + { + "properties": { + "onboardingState": "NotOnboarded", + "actionableRemediation": { + "state": "None" + } + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/notOnboardedOrg", + "name": "notOnboardedOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json new file mode 100644 index 000000000000..00a9415abb16 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "ownerUrl": "https://github.com/myGitHubOwner", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner", + "name": "myGitHubOwner", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners" + }, + { + "properties": { + "ownerUrl": "https://github.com/anotherGitHubOwner", + "onboardingState": "OnboardedByOtherConnector", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/anotherGitHubOwner", + "name": "anotherGitHubOwner", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners" + }, + { + "properties": { + "ownerUrl": "https://github.com/notOnboardedOwner", + "onboardingState": "NotOnboarded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/notOnboardedOwner", + "name": "notOnboardedOwner", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json new file mode 100644 index 000000000000..5918d9f2df9a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "fullyQualifiedName": "myGitLabGroup$mySubGroup", + "url": "https://gitlab.example.com/myGitLabGroup/mySubGroup", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup", + "name": "myGitLabGroup$mySubGroup", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups" + }, + { + "properties": { + "fullyQualifiedName": "myGitLabGroup", + "url": "https://gitlab.example.com/myGitLabGroup", + "onboardingState": "OnboardedByOtherConnector", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup", + "name": "myGitLabGroup", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups" + }, + { + "properties": { + "fullyQualifiedName": "anotherGitLabGroup", + "url": "https://gitlab.example.com/anotherGitLabGroup", + "onboardingState": "NotOnboarded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/anotherGitLabGroup", + "name": "anotherGitLabGroup", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json new file mode 100644 index 000000000000..c258bf643c40 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json new file mode 100644 index 000000000000..2299cce241ff --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "projectId": "9ebbed8f-a9cc-405f-a647-b235e22179de", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject", + "name": "myAzDevOpsProject", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json new file mode 100644 index 000000000000..a282f3dbe182 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "parentProjectName": "myAzDevOpsProject", + "repoId": "cb64ab91-c9ba-46df-b44c-c769358bccdf", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo", + "name": "myAzDevOpsRepo", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsConfigurations_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsConfigurations_example.json new file mode 100644 index 000000000000..032bcd2c0420 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsConfigurations_example.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "autoDiscovery": "Enabled", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicies_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicies_example.json new file mode 100644 index 000000000000..dfa76baf9899 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicies_example.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "source": "BuiltIn", + "policyId": "00000000-0000-0000-0000-000000000000", + "webUrl": "https://dev.azure.com/contoso/myPolicy", + "version": "1,0", + "type": "Pipeline", + "content": "JSON string of the policy content", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policies/myDevOpsPolicy", + "name": "myDevOpsPolicy", + "type": "Microsoft.Security/securityConnectors/devops/policies" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicyAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicyAssignments_example.json new file mode 100644 index 000000000000..fb20993d22ed --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListDevOpsPolicyAssignments_example.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policyAssignments/5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "name": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "type": "Microsoft.Security/securityConnectors/devops/policyAssignments" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json new file mode 100644 index 000000000000..c93128dbafcd --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "ownerUrl": "https://github.com/myGitHubOwner", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner", + "name": "myGitHubOwner", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json new file mode 100644 index 000000000000..c5b85cfcc6b0 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "ownerName": "myGitHubOwner", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "repoName": "myGitHubRepo", + "repoFullName": "myGitHubOwner/myGitHubRepo", + "onboardingState": "Onboarded", + "repoUrl": "https://github.com/myGitHubOwner/myGitHubRepo", + "parentOwnerName": "myGitHubOwner", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitHubOwners/myGitHubOwner/repos/myGitHubRepo", + "name": "myGitHubRepo", + "type": "Microsoft.Security/securityConnectors/devops/gitHubOwners/repos" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json new file mode 100644 index 000000000000..d1d14847b61a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "fullyQualifiedName": "myGitLabGroup$mySubGroup", + "url": "https://gitlab.example.com/myGitLabGroup/mySubGroup", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup", + "name": "myGitLabGroup$mySubGroup", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json new file mode 100644 index 000000000000..27b59400f249 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "groupFQName": "myGitLabGroup$mySubGroup", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "fullyQualifiedName": "myGitLabGroup$mySubGroup$myGitLabProject", + "fullyQualifiedParentGroupName": "myGitLabGroup$mySubGroup", + "url": "https://gitlab.example.com/myGitLabGroup/mySubGroup/myGitLabProject", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup/projects/myGitLabProject", + "name": "myGitLabProject", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups/projects" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json new file mode 100644 index 000000000000..73b6c7156aa7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "groupFQName": "myGitLabGroup", + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "fullyQualifiedName": "myGitLabGroup$mySubGroup", + "url": "https://gitlab.example.com/myGitLabGroup/mySubGroup", + "onboardingState": "Onboarded", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/gitLabGroups/myGitLabGroup$mySubGroup", + "name": "myGitLabGroup$mySubGroup", + "type": "Microsoft.Security/securityConnectors/devops/gitLabGroups" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json new file mode 100644 index 000000000000..e0502ffa72a2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "azureDevOpsOrg": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "Enabled" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "None" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg", + "name": "myAzDevOpsOrg", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json new file mode 100644 index 000000000000..da53fcacdbac --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "azureDevOpsProject": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "Enabled" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "projectId": "9ebbed8f-a9cc-405f-a647-b235e22179de", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject", + "name": "myAzDevOpsProject", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "projectId": "9ebbed8f-a9cc-405f-a647-b235e22179de", + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "None" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject", + "name": "myAzDevOpsProject", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json new file mode 100644 index 000000000000..dd000b40b330 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "orgName": "myAzDevOpsOrg", + "projectName": "myAzDevOpsProject", + "repoName": "myAzDevOpsRepo", + "azureDevOpsRepository": { + "properties": { + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "Enabled" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "parentProjectName": "myAzDevOpsProject", + "repoId": "cb64ab91-c9ba-46df-b44c-c769358bccdf", + "onboardingState": "Onboarded", + "actionableRemediation": { + "state": "Enabled" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo", + "name": "myAzDevOpsRepo", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "parentOrgName": "myAzDevOpsOrg", + "parentProjectName": "myAzDevOpsProject", + "repoId": "cb64ab91-c9ba-46df-b44c-c769358bccdf", + "onboardingState": "NotApplicable", + "actionableRemediation": { + "state": "None" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/myAzDevOpsOrg/projects/myAzDevOpsProject/repos/myAzDevOpsRepo", + "name": "myAzDevOpsRepo", + "type": "Microsoft.Security/securityConnectors/devops/azureDevOpsOrgs/projects/repos" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json new file mode 100644 index 000000000000..8845c82d8e76 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "devOpsConfiguration": { + "properties": { + "autoDiscovery": "Enabled" + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "autoDiscovery": "Enabled", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default", + "name": "default", + "type": "Microsoft.Security/securityConnectors/devops" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsPolicyAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsPolicyAssignments_example.json new file mode 100644 index 000000000000..7e591a8fadab --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsPolicyAssignments_example.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3", + "resourceGroupName": "myRg", + "securityConnectorName": "mySecurityConnectorName", + "policyAssignmentId": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "devOpsPolicyAssignment": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + } + } + }, + "api-version": "2024-05-15-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policyAssignments/5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "name": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "type": "Microsoft.Security/securityConnectors/devops/policyAssignments" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/operationResults/4e826cf1-5c36-4808-a7d2-fb4f5170978b?api-version=2024-05-15-preview" + }, + "body": { + "properties": { + "resourceId": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourcegroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/azureDevOpsOrgs/Contoso", + "descendantBehavior": "Override", + "policy": { + "policyName": "myDevOpsPolicy", + "policyId": "00000000-0000-0000-0000-000000000000", + "policyVersion": "1.0", + "policyType": "Pipeline" + }, + "provisioningState": "Accepted" + }, + "id": "/subscriptions/0806e1cd-cfda-4ff8-b99c-2b0af42cffd3/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName/devops/default/policyAssignments/5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "name": "5ec87f43-62d8-437b-8f46-4c8d4032cf6d", + "type": "Microsoft.Security/securityConnectors/devops/policyAssignments" + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/securityConnectorsDevOps.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/securityConnectorsDevOps.json new file mode 100644 index 000000000000..e2e0e66b1b6d --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-05-15-preview/securityConnectorsDevOps.json @@ -0,0 +1,3246 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.Security", + "description": "REST APIs for Defender for DevOps", + "version": "2024-05-15-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/listAvailableAzureDevOpsOrgs": { + "post": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector.", + "operationId": "AzureDevOpsOrgs_ListAvailable", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides list of Azure DevOps organization details", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrgListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListAvailable_AzureDevOpsOrgs": { + "$ref": "./examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of Azure DevOps organizations onboarded to the connector.", + "operationId": "AzureDevOpsOrgs_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of Azure DevOps organization details", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrgListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_AzureDevOpsOrgs": { + "$ref": "./examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored Azure DevOps organization resource.", + "operationId": "AzureDevOpsOrgs_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides Azure DevOps organization details", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_AzureDevOpsOrgs": { + "$ref": "./examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json" + } + } + }, + "put": { + "tags": [ + "DevOps" + ], + "summary": "Creates or updates monitored Azure DevOps organization details.", + "operationId": "AzureDevOpsOrgs_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "azureDevOpsOrg", + "description": "The Azure DevOps organization resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + } + ], + "responses": { + "200": { + "description": "Creates or updates monitored Azure DevOps organization details", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CreateOrUpdate_AzureDevOpsOrgs": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json" + } + } + }, + "patch": { + "tags": [ + "DevOps" + ], + "summary": "Updates monitored Azure DevOps organization details.", + "operationId": "AzureDevOpsOrgs_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "azureDevOpsOrg", + "description": "The Azure DevOps organization resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/AzureDevOpsOrg" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update_AzureDevOpsOrgs": { + "$ref": "./examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of Azure DevOps projects onboarded to the connector.", + "operationId": "AzureDevOpsProjects_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of Azure DevOps project details", + "schema": { + "$ref": "#/definitions/AzureDevOpsProjectListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_AzureDevOpsProjects": { + "$ref": "./examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored Azure DevOps project resource.", + "operationId": "AzureDevOpsProjects_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides Azure DevOps project details", + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_AzureDevOpsProjects": { + "$ref": "./examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json" + } + } + }, + "put": { + "tags": [ + "DevOps" + ], + "summary": "Creates or updates a monitored Azure DevOps project resource.", + "operationId": "AzureDevOpsProjects_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "azureDevOpsProject", + "description": "The Azure DevOps project resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + } + ], + "responses": { + "200": { + "description": "Creates or updates a monitored Azure DevOps project resource", + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CreateOrUpdate_AzureDevOpsProjects": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json" + } + } + }, + "patch": { + "tags": [ + "DevOps" + ], + "summary": "Updates a monitored Azure DevOps project resource.", + "operationId": "AzureDevOpsProjects_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "azureDevOpsProject", + "description": "The Azure DevOps project resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/AzureDevOpsProject" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update_AzureDevOpsProjects": { + "$ref": "./examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of Azure DevOps repositories onboarded to the connector.", + "operationId": "AzureDevOpsRepos_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of Azure DevOps repository details", + "schema": { + "$ref": "#/definitions/AzureDevOpsRepositoryListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_AzureDevOpsRepos": { + "$ref": "./examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos/{repoName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored Azure DevOps repository resource.", + "operationId": "AzureDevOpsRepos_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "#/parameters/RepoName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides Azure DevOps repository details", + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_AzureDevOpsRepos": { + "$ref": "./examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json" + } + } + }, + "put": { + "tags": [ + "DevOps" + ], + "summary": "Creates or updates a monitored Azure DevOps repository resource.", + "operationId": "AzureDevOpsRepos_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "#/parameters/RepoName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "azureDevOpsRepository", + "description": "The Azure DevOps repository resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + } + ], + "responses": { + "200": { + "description": "Creates or updates a monitored Azure DevOps repository resource", + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CreateOrUpdate_AzureDevOpsRepos": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json" + } + } + }, + "patch": { + "tags": [ + "DevOps" + ], + "summary": "Updates a monitored Azure DevOps repository resource.", + "operationId": "AzureDevOpsRepos_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OrgName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "#/parameters/RepoName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "azureDevOpsRepository", + "description": "The Azure DevOps repository resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/AzureDevOpsRepository" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update_AzureDevOpsRepos": { + "$ref": "./examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "List DevOps Configurations.", + "operationId": "DevOpsConfigurations_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DevOpsConfigurationListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_DevOpsConfigurations": { + "$ref": "./examples/SecurityConnectorsDevOps/ListDevOpsConfigurations_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Gets a DevOps Configuration.", + "operationId": "DevOpsConfigurations_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_DevOpsConfigurations": { + "$ref": "./examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json" + }, + "Get_DevOpsConfigurations_WithCapabilities": { + "$ref": "./examples/SecurityConnectorsDevOps/GetDevOpsConfigurationsWithCapabilities_example.json" + } + } + }, + "put": { + "tags": [ + "DevOps" + ], + "summary": "Creates or updates a DevOps Configuration.", + "operationId": "DevOpsConfigurations_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "devOpsConfiguration", + "description": "The DevOps configuration resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + } + ], + "responses": { + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + }, + "200": { + "description": "Creates or updates a DevOps Configuration", + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CreateOrUpdate_DevOpsConfigurations_OnboardCurrentAndFuture": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json" + }, + "CreateOrUpdate_DevOpsConfigurations_OnboardCurrentOnly": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json" + }, + "CreateOrUpdate_DevOpsConfigurations_OnboardSelected": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json" + } + } + }, + "patch": { + "tags": [ + "DevOps" + ], + "summary": "Updates a DevOps Configuration.", + "operationId": "DevOpsConfigurations_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "devOpsConfiguration", + "description": "The DevOps configuration resource payload.", + "required": true, + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/DevOpsConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update_DevOpsConfigurations": { + "$ref": "./examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json" + } + } + }, + "delete": { + "tags": [ + "DevOps" + ], + "summary": "Deletes a DevOps Connector.", + "operationId": "DevOpsConfigurations_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "204": { + "description": "NoContent" + }, + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete_DevOpsConfigurations": { + "$ref": "./examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/policies": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of DevOps Policies.", + "operationId": "DevOpsPolicies_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/DevOpsPolicyType" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of DevOps Policies.", + "schema": { + "$ref": "#/definitions/DevOpsPolicyListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_DevOpsPolicies": { + "$ref": "./examples/SecurityConnectorsDevOps/ListDevOpsPolicies_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/policies/{policyName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a DevOps Policy.", + "operationId": "DevOpsPolicies_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/PolicyName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides DevOps Policy details.", + "schema": { + "$ref": "#/definitions/DevOpsPolicy" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_DevOpsPolicies": { + "$ref": "./examples/SecurityConnectorsDevOps/GetDevOpsPolicies_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/policyAssignments": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of DevOps Policy Assignments.", + "operationId": "DevOpsPolicyAssignments_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/DevOpsPolicyType" + }, + { + "$ref": "#/parameters/ResourceId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of DevOps Policy Assignments.", + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignmentListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_DevOpsPolicyAssignments": { + "$ref": "./examples/SecurityConnectorsDevOps/ListDevOpsPolicyAssignments_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/policyAssignments/{policyAssignmentId}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a DevOps Policy Assignment Resource.", + "operationId": "DevOpsPolicyAssignments_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/PolicyAssignmentId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides DevOps Policy Assignment details.", + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_DevOpsPolicyAssignments": { + "$ref": "./examples/SecurityConnectorsDevOps/GetDevOpsPolicyAssignments_example.json" + } + } + }, + "put": { + "tags": [ + "DevOps" + ], + "summary": "Creates or updates a DevOps Policy Assignment Resource.", + "operationId": "DevOpsPolicyAssignments_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/PolicyAssignmentId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "devOpsPolicyAssignment", + "description": "The DevOps Policy Assignment.", + "required": true, + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + } + ], + "responses": { + "200": { + "description": "Creates or updates a DevOps Policy Assignment.", + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CreateOrUpdate_DevOpsPolicyAssignments": { + "$ref": "./examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsPolicyAssignments_example.json" + } + } + }, + "patch": { + "tags": [ + "DevOps" + ], + "summary": "Updates a DevOps Policy Assignment Resource.", + "operationId": "DevOpsPolicyAssignments_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/PolicyAssignmentId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "devOpsPolicyAssignment", + "description": "The DevOps Policy Assignment.", + "required": true, + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + } + ], + "responses": { + "200": { + "description": "Updates a DevOps Policy Assignment.", + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update_DevOpsPolicyAssignments": { + "$ref": "./examples/SecurityConnectorsDevOps/UpdateDevOpsPolicyAssignments_example.json" + } + } + }, + "delete": { + "tags": [ + "DevOps" + ], + "summary": "Deletes a DevOps Policy Assignment Resource.", + "operationId": "DevOpsPolicyAssignments_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/PolicyAssignmentId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete_DevOpsPolicyAssignments": { + "$ref": "./examples/SecurityConnectorsDevOps/DeleteDevOpsPolicyAssignments_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/listAvailableGitHubOwners": { + "post": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of all GitHub owners accessible by the user token consumed by the connector.", + "operationId": "GitHubOwners_ListAvailable", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides list of GitHub owner resources", + "schema": { + "$ref": "#/definitions/GitHubOwnerListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListAvailable_GitHubOwners": { + "$ref": "./examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of GitHub owners onboarded to the connector.", + "operationId": "GitHubOwners_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides list of GitHub owner resources", + "schema": { + "$ref": "#/definitions/GitHubOwnerListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_GitHubOwners": { + "$ref": "./examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored GitHub owner.", + "operationId": "GitHubOwners_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OwnerName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides GitHub owner details", + "schema": { + "$ref": "#/definitions/GitHubOwner" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_GitHubOwners": { + "$ref": "./examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}/repos": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of GitHub repositories onboarded to the connector.", + "operationId": "GitHubRepos_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OwnerName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides list of GitHub repository resources", + "schema": { + "$ref": "#/definitions/GitHubRepositoryListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_GitHubRepos": { + "$ref": "./examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}/repos/{repoName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored GitHub repository.", + "operationId": "GitHubRepos_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OwnerName" + }, + { + "$ref": "#/parameters/RepoName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides GitHub repository details", + "schema": { + "$ref": "#/definitions/GitHubRepository" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_GitHubRepos": { + "$ref": "./examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/listAvailableGitLabGroups": { + "post": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of all GitLab groups accessible by the user token consumed by the connector.", + "operationId": "GitLabGroups_ListAvailable", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of GitLab Group details", + "schema": { + "$ref": "#/definitions/GitLabGroupListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListAvailable_GitLabGroups": { + "$ref": "./examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a list of GitLab groups onboarded to the connector.", + "operationId": "GitLabGroups_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of GitLab Group details", + "schema": { + "$ref": "#/definitions/GitLabGroupListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_GitLabGroups": { + "$ref": "./examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored GitLab Group resource for a given fully-qualified name.", + "operationId": "GitLabGroups_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/GroupFQName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides GitLab Group details", + "schema": { + "$ref": "#/definitions/GitLabGroup" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_GitLabGroups": { + "$ref": "./examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/listSubgroups": { + "post": { + "tags": [ + "DevOps" + ], + "summary": "Gets nested subgroups of given GitLab Group which are onboarded to the connector.", + "operationId": "GitLabSubgroups_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/GroupFQName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of GitLab Group details for subgroups", + "schema": { + "$ref": "#/definitions/GitLabGroupListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List_GitLabSubgroups": { + "$ref": "./examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/projects": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector.", + "operationId": "GitLabProjects_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/GroupFQName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides a list of GitLab Project details", + "schema": { + "$ref": "#/definitions/GitLabProjectListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List_GitLabProjects": { + "$ref": "./examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/projects/{projectName}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Returns a monitored GitLab Project resource for a given fully-qualified group name and project name.", + "operationId": "GitLabProjects_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/GroupFQName" + }, + { + "$ref": "#/parameters/ProjectName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Provides GitLab Project details", + "schema": { + "$ref": "#/definitions/GitLabProject" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_GitLabProjects": { + "$ref": "./examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/operationResults/{operationResultId}": { + "get": { + "tags": [ + "DevOps" + ], + "summary": "Get devops long running operation result.", + "operationId": "DevOpsOperationResults_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SecurityConnectorName" + }, + { + "$ref": "#/parameters/OperationResultId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/OperationStatusResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get_DevOpsOperationResults_Succeeded": { + "$ref": "./examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json" + }, + "Get_DevOpsOperationResults_Failed": { + "$ref": "./examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json" + } + } + } + } + }, + "definitions": { + "ActionableRemediation": { + "description": "Configuration payload for PR Annotations.", + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/ActionableRemediationState" + }, + "categoryConfigurations": { + "description": "Gets or sets list of categories and severity levels.", + "type": "array", + "items": { + "$ref": "#/definitions/CategoryConfiguration" + }, + "x-ms-identifiers": [] + }, + "branchConfiguration": { + "$ref": "#/definitions/TargetBranchConfiguration" + }, + "inheritFromParentState": { + "$ref": "#/definitions/InheritFromParentState" + } + } + }, + "ActionableRemediationState": { + "description": "ActionableRemediation Setting.\r\nNone - the setting was never set.\r\nEnabled - ActionableRemediation is enabled.\r\nDisabled - ActionableRemediation is disabled.", + "enum": [ + "None", + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ActionableRemediationState", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "AnnotateDefaultBranchState": { + "description": "Configuration of PR Annotations on default branch.\r\n\r\nEnabled - PR Annotations are enabled on the resource's default branch.\r\nDisabled - PR Annotations are disabled on the resource's default branch.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AnnotateDefaultBranchState", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "Authorization": { + "description": "Authorization payload.", + "type": "object", + "properties": { + "code": { + "description": "Gets or sets one-time OAuth code to exchange for refresh and access tokens.\r\n\r\nOnly used during PUT/PATCH operations. The secret is cleared during GET.", + "type": "string", + "example": "00000000000000000000.", + "x-ms-secret": true + } + } + }, + "AutoDiscovery": { + "description": "AutoDiscovery states.", + "enum": [ + "Disabled", + "Enabled", + "NotApplicable" + ], + "type": "string", + "x-ms-enum": { + "name": "AutoDiscovery", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "AzureDevOpsOrg": { + "description": "Azure DevOps Organization resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/AzureDevOpsOrgProperties" + } + } + }, + "AzureDevOpsOrgListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/AzureDevOpsOrg" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "AzureDevOpsOrgProperties": { + "description": "Azure DevOps Organization properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + }, + "actionableRemediation": { + "$ref": "#/definitions/ActionableRemediation" + } + } + }, + "AzureDevOpsOrganizationConfiguration": { + "description": "AzureDevOps Org Inventory Configuration.", + "type": "object", + "properties": { + "autoDiscovery": { + "$ref": "#/definitions/AutoDiscovery" + }, + "projectConfigs": { + "description": "AzureDevOps Project Inventory Configuration.\r\nDictionary of AzureDevOps project name to desired project configuration.\r\nIf AutoDiscovery is Enabled, this field should be empty or null.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AzureDevOpsProjectConfiguration" + }, + "x-nullable": true + } + } + }, + "AzureDevOpsProject": { + "description": "Azure DevOps Project resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/AzureDevOpsProjectProperties" + } + } + }, + "AzureDevOpsProjectConfiguration": { + "description": "AzureDevOps Project Inventory Configuration.", + "type": "object", + "properties": { + "autoDiscovery": { + "$ref": "#/definitions/AutoDiscovery" + }, + "repositoryConfigs": { + "description": "AzureDevOps Repository Inventory Configuration.\r\nDictionary of AzureDevOps repository name to desired repository configuration.\r\nIf AutoDiscovery is Enabled, this field should be null or empty.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BaseResourceConfiguration" + }, + "x-nullable": true + } + } + }, + "AzureDevOpsProjectListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/AzureDevOpsProject" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "AzureDevOpsProjectProperties": { + "description": "Azure DevOps Project properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "parentOrgName": { + "description": "Gets or sets parent Azure DevOps Organization name.", + "type": "string" + }, + "projectId": { + "description": "Gets or sets Azure DevOps Project id.", + "type": "string", + "readOnly": true + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + }, + "actionableRemediation": { + "$ref": "#/definitions/ActionableRemediation" + } + } + }, + "AzureDevOpsRepository": { + "description": "Azure DevOps Repository resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/AzureDevOpsRepositoryProperties" + } + } + }, + "AzureDevOpsRepositoryListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/AzureDevOpsRepository" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "AzureDevOpsRepositoryProperties": { + "description": "Azure DevOps Repository properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "parentOrgName": { + "description": "Gets or sets parent Azure DevOps Organization name.", + "type": "string" + }, + "parentProjectName": { + "description": "Gets or sets parent Azure DevOps Project name.", + "type": "string" + }, + "repoId": { + "description": "Gets or sets Azure DevOps Repository id.", + "type": "string", + "readOnly": true + }, + "repoUrl": { + "description": "Gets or sets Azure DevOps Repository url.", + "type": "string", + "readOnly": true + }, + "visibility": { + "description": "Gets or sets Azure DevOps repository visibility, whether it is public or private etc.", + "type": "string", + "readOnly": true + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + }, + "actionableRemediation": { + "$ref": "#/definitions/ActionableRemediation" + } + } + }, + "BaseResourceConfiguration": { + "description": "Base Resource Inventory configuration changes.", + "type": "object", + "properties": { + "desiredOnboardingState": { + "$ref": "#/definitions/DesiredOnboardingState" + } + } + }, + "CategoryConfiguration": { + "description": "Severity level per category configuration for PR Annotations.", + "type": "object", + "properties": { + "minimumSeverityLevel": { + "description": "Gets or sets minimum severity level for a given category.", + "type": "string" + }, + "category": { + "$ref": "#/definitions/RuleCategory" + } + } + }, + "DescendantBehavior": { + "description": "The behavior of a policy on descendant resources.", + "enum": [ + "Unknown", + "Override", + "FallBack" + ], + "type": "string", + "x-ms-enum": { + "name": "DescendantBehavior", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "DesiredOnboardingState": { + "description": "Onboarding states.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DesiredOnboardingState", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "DevOpsCapability": { + "description": "Details about DevOps capability.", + "type": "object", + "properties": { + "name": { + "description": "Gets the name of the DevOps capability.", + "type": "string", + "readOnly": true + }, + "value": { + "description": "Gets the value of the DevOps capability.", + "type": "string", + "readOnly": true + } + } + }, + "DevOpsConfiguration": { + "description": "DevOps Configuration resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/DevOpsConfigurationProperties" + } + } + }, + "DevOpsConfigurationListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/DevOpsConfiguration" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "DevOpsConfigurationProperties": { + "description": "DevOps Configuration properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "authorization": { + "$ref": "#/definitions/Authorization" + }, + "autoDiscovery": { + "$ref": "#/definitions/AutoDiscovery" + }, + "topLevelInventoryList": { + "description": "List of top-level inventory to select when AutoDiscovery is disabled.\r\nThis field is ignored when AutoDiscovery is enabled.", + "type": "array", + "items": { + "type": "string" + } + }, + "capabilities": { + "description": "List of capabilities assigned to the DevOps configuration during the discovery process.", + "type": "array", + "items": { + "$ref": "#/definitions/DevOpsCapability" + }, + "x-ms-identifiers": [], + "readOnly": true + } + } + }, + "DevOpsPolicy": { + "description": "DevOps Policy Resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/DevOpsPolicyProperties" + } + } + }, + "DevOpsPolicyAssignment": { + "description": "DevOps Policy assignment resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/DevOpsPolicyAssignmentProperties" + } + } + }, + "DevOpsPolicyAssignmentListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/DevOpsPolicyAssignment" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "DevOpsPolicyAssignmentProperties": { + "description": "Properties of the DevOps policy assignment resource.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "resourceId": { + "description": "Gets or sets the Azure resource id.", + "type": "string", + "format": "arm-id" + }, + "descendantBehavior": { + "$ref": "#/definitions/DescendantBehavior" + }, + "policy": { + "$ref": "#/definitions/DevOpsPolicyDescriptor" + }, + "assignedAt": { + "format": "date-time", + "description": "Gets or sets time when the assignment was created in UTC.", + "type": "string" + } + } + }, + "DevOpsPolicyDescriptor": { + "description": "Condensed information to identify a DevOps Policy resource.", + "type": "object", + "properties": { + "policyName": { + "description": "Gets or sets the policy name.", + "type": "string" + }, + "policyId": { + "description": "Gets or sets the policy GUID.", + "type": "string" + }, + "policyVersion": { + "description": "Gets or sets the version.", + "type": "string" + }, + "policyType": { + "$ref": "#/definitions/DevOpsPolicyType" + } + } + }, + "DevOpsPolicyListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/DevOpsPolicy" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "DevOpsPolicyProperties": { + "description": "Policy DevOps Resource properties that contain the full definition of a DevOps policy resource.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "source": { + "$ref": "#/definitions/DevOpsPolicySource" + }, + "policyId": { + "description": "Gets the policy resource GUID.", + "type": "string", + "readOnly": true, + "format": "uuid" + }, + "webUrl": { + "description": "Gets the web URL.", + "type": "string", + "readOnly": true, + "format": "url" + }, + "version": { + "description": "Gets or sets the semantic version.", + "type": "string" + }, + "type": { + "$ref": "#/definitions/DevOpsPolicyType" + }, + "content": { + "description": "Gets or sets the policy definition content JSON string.", + "type": "string" + } + } + }, + "DevOpsPolicySource": { + "description": "DevOps Policy creation sources.", + "enum": [ + "Unknown", + "BuiltIn", + "UserDefined" + ], + "type": "string", + "x-ms-enum": { + "name": "DevOpsPolicySource", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "DevOpsPolicyType": { + "description": "DevOps Policy resource types.", + "enum": [ + "Unknown", + "Pipeline" + ], + "type": "string", + "x-ms-enum": { + "name": "DevOpsPolicyType", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "DevOpsProvisioningState": { + "description": "The provisioning state of the resource.\r\n\r\nPending - Provisioning pending.\r\nFailed - Provisioning failed.\r\nSucceeded - Successful provisioning.\r\nCanceled - Provisioning canceled.\r\nPendingDeletion - Deletion pending.\r\nDeletionSuccess - Deletion successful.\r\nDeletionFailure - Deletion failure.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Pending", + "PendingDeletion", + "DeletionSuccess", + "DeletionFailure" + ], + "type": "string", + "x-ms-enum": { + "name": "DevOpsProvisioningState", + "modelAsString": true, + "modelAsExtensible": true + }, + "readOnly": true + }, + "GitHubOwner": { + "description": "GitHub Owner resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/GitHubOwnerProperties" + } + } + }, + "GitHubOwnerConfiguration": { + "description": "GitHub Owner Inventory Configuration.", + "type": "object", + "properties": { + "autoDiscovery": { + "$ref": "#/definitions/AutoDiscovery" + }, + "repositoryConfigs": { + "description": "GitHub Repository Inventory Configuration.\r\nDictionary of GitHub repository name to desired repository configuration.\r\nIf AutoDiscovery is Enabled, this field should be null or empty.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BaseResourceConfiguration" + }, + "x-nullable": true + } + } + }, + "GitHubOwnerListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/GitHubOwner" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "GitHubOwnerProperties": { + "description": "GitHub Owner properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "ownerUrl": { + "description": "Gets or sets GitHub Owner url.", + "type": "string", + "readOnly": true + }, + "gitHubInternalId": { + "description": "Gets or sets internal GitHub id.", + "type": "string", + "readOnly": true + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + } + } + }, + "GitHubRepository": { + "description": "GitHub Repository resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/GitHubRepositoryProperties" + } + } + }, + "GitHubRepositoryListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/GitHubRepository" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "GitHubRepositoryProperties": { + "description": "GitHub Repository properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "repoId": { + "description": "Gets or sets GitHub Repository id.\r\n\r\nThis is a numeric id defined by Github.\r\nEg: \"123456\".", + "type": "string", + "readOnly": true + }, + "repoName": { + "description": "Gets or sets GitHub Repository name.\r\nEg: \"new-repo-1\".", + "type": "string", + "readOnly": true + }, + "repoFullName": { + "description": "Gets or sets GitHub Full Name.\r\nRepository name, prefixed with Owner name.\r\nEg: \"my-org/new-repo-1\".", + "type": "string", + "readOnly": true + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + }, + "repoUrl": { + "description": "Gets or sets GitHub Repository url.", + "type": "string", + "readOnly": true + }, + "parentOwnerName": { + "description": "Gets or sets parent GitHub Owner name.", + "type": "string" + } + } + }, + "GitLabGroup": { + "description": "GitLab Group resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/GitLabGroupProperties" + } + } + }, + "GitLabGroupConfiguration": { + "description": "GitLab Group Inventory Configuration.", + "type": "object", + "properties": { + "autoDiscovery": { + "$ref": "#/definitions/AutoDiscovery" + }, + "projectConfigs": { + "description": "GitLab Project Inventory Configuration.\r\nDictionary of GitLab fully-qualified project name to desired project configuration.\r\nIf AutoDiscovery is Enabled, this field should be null or empty.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BaseResourceConfiguration" + }, + "x-nullable": true + } + } + }, + "GitLabGroupListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/GitLabGroup" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "GitLabGroupProperties": { + "description": "GitLab Group properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "fullyQualifiedName": { + "description": "Gets or sets the fully-qualified name of the Group object.\r\n\r\nThis contains the entire namespace hierarchy where namespaces are separated by the '$' character.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedFriendlyName": { + "description": "Gets or sets the human readable fully-qualified name of the Group object.\r\n\r\nThis contains the entire namespace hierarchy as seen on GitLab UI where namespaces are separated by the '/' character.", + "type": "string", + "readOnly": true + }, + "url": { + "description": "Gets or sets the url of the GitLab Group.", + "type": "string", + "readOnly": true + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + } + } + }, + "GitLabProject": { + "description": "GitLab Project resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/GitLabProjectProperties" + } + } + }, + "GitLabProjectListResponse": { + "description": "List of RP resources which supports pagination.", + "type": "object", + "properties": { + "value": { + "description": "Gets or sets list of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/GitLabProject" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Gets or sets next link to scroll over the results.", + "type": "string" + } + } + }, + "GitLabProjectProperties": { + "description": "GitLab Project properties.", + "type": "object", + "properties": { + "provisioningStatusMessage": { + "description": "Gets the resource status message.", + "type": "string", + "example": "Resource onboarded successful.", + "readOnly": true + }, + "provisioningStatusUpdateTimeUtc": { + "format": "date-time", + "description": "Gets the time when resource was last checked.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevOpsProvisioningState" + }, + "fullyQualifiedName": { + "description": "Gets or sets the fully-qualified name of the project object.\r\n\r\nThis contains the entire hierarchy where entities are separated by the '$' character.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedFriendlyName": { + "description": "Gets or sets the human readable fully-qualified name of the Project object.\r\n\r\nThis contains the entire namespace hierarchy as seen on GitLab UI where entities are separated by the '/' character.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedParentGroupName": { + "description": "Gets or sets the fully-qualified name of the project's parent group object.\r\n\r\nThis contains the entire hierarchy where namespaces are separated by the '$' character.", + "type": "string", + "readOnly": true + }, + "url": { + "description": "Gets or sets the url of the GitLab Project.", + "type": "string", + "readOnly": true + }, + "onboardingState": { + "$ref": "#/definitions/OnboardingState" + } + } + }, + "InheritFromParentState": { + "description": "Update Settings.\r\n\r\nEnabled - Resource should inherit configurations from parent.\r\nDisabled - Resource should not inherit configurations from parent.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "InheritFromParentState", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "OnboardingState": { + "description": "Details about resource onboarding status across all connectors.\r\n\r\nOnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources.\r\nOnboarded - this resource has already been onboarded by the specified connector.\r\nNotOnboarded - this resource has not been onboarded to any connector.\r\nNotApplicable - the onboarding state is not applicable to the current endpoint.", + "enum": [ + "NotApplicable", + "OnboardedByOtherConnector", + "Onboarded", + "NotOnboarded" + ], + "type": "string", + "x-ms-enum": { + "name": "OnboardingState", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "RuleCategory": { + "description": "Rule categories.\r\nCode - code scanning results.\r\nArtifact scanning results.\r\nDependencies scanning results.\r\nIaC results.\r\nSecrets scanning results.\r\nContainer scanning results.", + "enum": [ + "Code", + "Artifacts", + "Dependencies", + "Secrets", + "IaC", + "Containers" + ], + "type": "string", + "x-ms-enum": { + "name": "RuleCategory", + "modelAsString": true, + "modelAsExtensible": true + } + }, + "TargetBranchConfiguration": { + "description": "Repository branch configuration for PR Annotations.", + "type": "object", + "properties": { + "branchNames": { + "description": "Gets or sets branches that should have annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-ms-identifiers": [] + }, + "annotateDefaultBranch": { + "$ref": "#/definitions/AnnotateDefaultBranchState" + } + } + } + }, + "parameters": { + "SecurityConnectorName": { + "in": "path", + "name": "securityConnectorName", + "description": "The security connector name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "OrgName": { + "in": "path", + "name": "orgName", + "description": "The Azure DevOps organization name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ProjectName": { + "in": "path", + "name": "projectName", + "description": "The project name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "RepoName": { + "in": "path", + "name": "repoName", + "description": "The repository name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DevOpsPolicyType": { + "in": "query", + "name": "devOpsPolicyType", + "description": "Optional filter for listing the policies.", + "type": "string", + "x-ms-parameter-location": "method" + }, + "PolicyName": { + "in": "path", + "name": "policyName", + "description": "The policy name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ResourceId": { + "in": "query", + "name": "resourceId", + "description": "Optional filter for listing the assignments of a specific resource.", + "type": "string", + "x-ms-parameter-location": "method" + }, + "PolicyAssignmentId": { + "in": "path", + "name": "policyAssignmentId", + "description": "The policy assignment Id.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "OwnerName": { + "in": "path", + "name": "ownerName", + "description": "The GitHub owner name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "GroupFQName": { + "in": "path", + "name": "groupFQName", + "description": "The GitLab group fully-qualified name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "OperationResultId": { + "in": "path", + "name": "operationResultId", + "description": "The operation result Id.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "description": "Azure Active Directory OAuth2 Flow" + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index e55be16b3277..4a4c1715b07c 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -106,11 +106,31 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. + +### Tag: package-preview-2024-05 + +These settings apply only when `--tag=package-preview-2024-05` is specified on the command line. + +```yaml $(tag) == 'package-preview-2024-05' +input-file: + - Microsoft.Security/preview/2024-05-15-preview/securityConnectorsDevOps.json +suppressions: + - code: LroLocationHeader + from: securityConnectorsDevOps.json + reason: False positive. Per ResourceProvider specification SecurityConnectors DevOps uses Azure-AsyncOperation header instead of Location header + - code: ResourceNameRestriction + from: securityConnectorsDevOps.json + reason: SecurityConnectors DevOps collects data from thirdparty providers which do not always specify name patterns + - code: OperationsAPIImplementation + from: securityConnectorsDevOps.json + reason: Suppression of OperationsAPI as it doesn't apply to this specific file. +``` + ### Tag: package-2024-04 These settings apply only when `--tag=package-2024-04` is specified on the command line. -```yaml $(tag) == 'package-2024-04' +``` yaml $(tag) == 'package-2024-04' input-file: - Microsoft.Security/stable/2024-04-01/securityConnectorsDevOps.json suppressions: @@ -131,7 +151,7 @@ suppressions: These settings apply only when `--tag=package-preview-2024-03` is specified on the command line. -```yaml $(tag) == 'package-preview-2024-03' +``` yaml $(tag) == 'package-preview-2024-03' input-file: - Microsoft.Security/preview/2024-03-01-preview/securityConnectors.json ``` @@ -497,6 +517,7 @@ input-file: - Microsoft.Security/preview/2023-12-01-preview/automations.json - Microsoft.Security/preview/2023-12-01-preview/securityContacts.json - Microsoft.Security/preview/2024-03-01-preview/securityConnectors.json +- Microsoft.Security/preview/2024-05-15-preview/securityConnectorsDevOps.json - Microsoft.Security/stable/2017-08-01/complianceResults.json - Microsoft.Security/stable/2019-01-01/advancedThreatProtectionSettings.json - Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json @@ -520,7 +541,6 @@ input-file: - Microsoft.Security/stable/2023-05-01/ServerVulnerabilityAssessmentsSettings.json - Microsoft.Security/stable/2023-11-15/apiCollections.json - Microsoft.Security/stable/2024-01-01/pricings.json -- Microsoft.Security/stable/2024-04-01/securityConnectorsDevOps.json # Autorest suppressions suppressions: