Skip to content

Commit

Permalink
SourceControl API 2022-01-01-preview version - adding new attribute t…
Browse files Browse the repository at this point in the history
…o SourceControl model (#17849)

* SourceControl 2022-01-01-preview version change

* fix validation error

* prettified

* prettified

Co-authored-by: debjyoti11 <[email protected]>
  • Loading branch information
debroy and debjyoti11 authored Feb 16, 2022
1 parent d4daab7 commit 812ad15
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@
"items": {
"$ref": "#/definitions/Repo"
},
"type": "array"
"type": "array",
"x-ms-identifiers": []
}
},
"required": [
Expand Down Expand Up @@ -357,6 +358,11 @@
"description": "The id (a Guid) of the source control",
"type": "string"
},
"version": {
"$ref": "#/definitions/Version",
"description": "The version number associated with the source control",
"type": "string"
},
"displayName": {
"description": "The display name of the source control",
"type": "string"
Expand All @@ -380,6 +386,14 @@
"repository": {
"description": "Repository metadata.",
"$ref": "#/definitions/Repository"
},
"repositoryResourceInfo": {
"description": "Information regarding the resources created in user's repository.",
"$ref": "#/definitions/RepositoryResourceInfo"
},
"lastDeploymentInfo": {
"description": "Information regarding the latest deployment for the source control.",
"$ref": "#/definitions/DeploymentInfo"
}
},
"required": [
Expand Down Expand Up @@ -415,7 +429,120 @@
"items": {
"$ref": "#/definitions/ContentPathMap"
},
"type": "array"
"type": "array",
"x-ms-identifiers": []
}
}
},
"RepositoryResourceInfo": {
"type": "object",
"description": "Resources created in user's repository for the source-control.",
"properties": {
"webhook": {
"type": "object",
"description": "The webhook object created for the source-control.",
"$ref": "#/definitions/Webhook"
},
"gitHubResourceInfo": {
"type": "object",
"description": "Resources created in GitHub for this source-control.",
"$ref": "#/definitions/GitHubResourceInfo"
},
"azureDevOpsResourceInfo": {
"type": "object",
"description": "Resources created in Azure DevOps for this source-control.",
"$ref": "#/definitions/AzureDevOpsResourceInfo"
}
}
},
"Webhook": {
"description": "Detail about the webhook object.",
"type": "object",
"properties": {
"webhookId": {
"description": "Unique identifier for the webhook.",
"type": "string"
},
"webhookUrl": {
"description": "URL that gets invoked by the webhook.",
"type": "string"
},
"webhookSecretUpdateTime": {
"description": "Time when the webhook secret was updated.",
"type": "string"
}
}
},
"GitHubResourceInfo": {
"description": "Resources created in GitHub repository.",
"type": "object",
"properties": {
"appInstallationId": {
"description": "GitHub application installation id.",
"type": "string"
}
}
},
"AzureDevOpsResourceInfo": {
"description": "Resources created in Azure DevOps repository.",
"type": "object",
"properties": {
"pipelineId": {
"description": "Id of the pipeline created for the source-control.",
"type": "string"
},
"serviceConnectionId": {
"description": "Id of the service-connection created for the source-control.",
"type": "string"
}
}
},
"DeploymentInfo": {
"description": "Information regarding a deployment.",
"type": "object",
"properties": {
"deploymentFetchStatus": {
"$ref": "#/definitions/DeploymentFetchStatus",
"description": "Status while fetching the last deployment.",
"type": "string"
},
"deployment": {
"$ref": "#/definitions/Deployment",
"description": "Deployment information.",
"type": "object"
},
"message": {
"description": "Additional details about the deployment that can be shown to the user.",
"type": "string"
}
}
},
"Deployment": {
"description": "Description about a deployment.",
"type": "object",
"properties": {
"deploymentId": {
"description": "Deployment identifier.",
"type": "string"
},
"deploymentState": {
"$ref": "#/definitions/DeploymentState",
"description": "Current status of the deployment.",
"type": "string"
},
"deploymentResult": {
"$ref": "#/definitions/DeploymentResult",
"description": "The outcome of the deployment.",
"type": "string"
},
"deploymentTime": {
"format": "date-time",
"description": "The time when the deployment finished.",
"type": "string"
},
"deploymentLogsUrl": {
"description": "Url to access repository action logs.",
"type": "string"
}
}
},
Expand Down Expand Up @@ -473,6 +600,102 @@
}
]
}
},
"Version": {
"description": "The version of the source control.",
"enum": [
"V1",
"V2"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "Version",
"values": [
{
"value": "V1"
},
{
"value": "V2"
}
]
}
},
"DeploymentFetchStatus": {
"description": "Status while trying to fetch the deployment information.",
"enum": [
"Success",
"Unauthorized",
"NotFound"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "DeploymentFetchStatus",
"values": [
{
"value": "Success"
},
{
"value": "Unauthorized"
},
{
"value": "NotFound"
}
]
}
},
"DeploymentState": {
"description": "The current state of the deployment.",
"enum": [
"In_Progress",
"Completed",
"Queued",
"Canceling"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "DeploymentState",
"values": [
{
"value": "In_Progress"
},
{
"value": "Completed"
},
{
"value": "Queued"
},
{
"value": "Canceling"
}
]
}
},
"DeploymentResult": {
"description": "Status while trying to fetch the deployment information.",
"enum": [
"Success",
"Canceled",
"Failed"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "DeploymentResult",
"values": [
{
"value": "Success"
},
{
"value": "Canceled"
},
{
"value": "Failed"
}
]
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"200": {
"body": {
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/sourcecontrols/789e0c1f-4a3d-43ad-809c-e713b677b04a",
"version": "V2",
"name": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
"type": "Microsoft.SecurityInsights/SourceControls",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
Expand Down Expand Up @@ -64,6 +65,28 @@
"path": "path/to/workbooks"
}
]
},
"repositoryResourceInfo": {
"webhook": {
"webhookId": "342768323",
"webhookUrl": "https://cac.sentinel.azure.com/workspaces/b7c525e9-1bfa-4435-88c0-817e13abb088/webhooks/ado/sourceControl/789e0c1f-4a3d-43ad-809c-e713b677b04a",
"webhookSecretUpdateTime": "2021-01-01T17:18:19.1234567Z"
},
"gitHubResourceInfo": {
"appInstallationId": "123"
},
"azureDevOpsResourceInfo": null
},
"lastDeploymentInfo": {
"deploymentFetchStatus": "Success",
"deployment": {
"deploymentId": "4985046420",
"deploymentState": "Completed",
"deploymentResult": "Success",
"deploymentTime": "2021-01-01T17:18:19.1234567Z",
"deploymentLogsUrl": "https://github.com/user/repo/actions"
},
"message": "Successful deployment"
}
},
"systemData": {
Expand All @@ -79,6 +102,7 @@
"201": {
"body": {
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/sourcecontrols/789e0c1f-4a3d-43ad-809c-e713b677b04a",
"version": "V2",
"name": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
"type": "Microsoft.SecurityInsights/SourceControls",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
Expand Down Expand Up @@ -106,6 +130,28 @@
"path": "path/to/workbooks"
}
]
},
"repositoryResourceInfo": {
"webhook": {
"webhookId": "342768323",
"webhookUrl": "https://cac.sentinel.azure.com/workspaces/b7c525e9-1bfa-4435-88c0-817e13abb088/webhooks/ado/sourceControl/789e0c1f-4a3d-43ad-809c-e713b677b04a",
"webhookSecretUpdateTime": "2021-01-01T17:18:19.1234567Z"
},
"gitHubResourceInfo": {
"appInstallationId": "123"
},
"azureDevOpsResourceInfo": null
},
"lastDeploymentInfo": {
"deploymentFetchStatus": "Success",
"deployment": {
"deploymentId": "4985046420",
"deploymentState": "Completed",
"deploymentResult": "Success",
"deploymentTime": "2021-01-01T17:18:19.1234567Z",
"deploymentLogsUrl": "https://github.com/user/repo/actions"
},
"message": "Successful deployment"
}
},
"systemData": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"200": {
"body": {
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/sourcecontrols/789e0c1f-4a3d-43ad-809c-e713b677b04a",
"version": "V2",
"name": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
"type": "Microsoft.SecurityInsights/SourceControls",
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
Expand Down Expand Up @@ -37,6 +38,28 @@
"path": "path/to/workbooks"
}
]
},
"repositoryResourceInfo": {
"webhook": {
"webhookId": "342768323",
"webhookUrl": "https://cac.sentinel.azure.com/workspaces/b7c525e9-1bfa-4435-88c0-817e13abb088/webhooks/ado/sourceControl/789e0c1f-4a3d-43ad-809c-e713b677b04a",
"webhookSecretUpdateTime": "2021-01-01T17:18:19.1234567Z"
},
"gitHubResourceInfo": {
"appInstallationId": "123"
},
"azureDevOpsResourceInfo": null
},
"lastDeploymentInfo": {
"deploymentFetchStatus": "Success",
"deployment": {
"deploymentId": "4985046420",
"deploymentState": "Completed",
"deploymentResult": "Success",
"deploymentTime": "2021-01-01T17:18:19.1234567Z",
"deploymentLogsUrl": "https://github.com/user/repo/actions"
},
"message": "Successful deployment"
}
},
"systemData": {
Expand Down
Loading

0 comments on commit 812ad15

Please sign in to comment.