Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PDS GA APIs. #23010

Merged
merged 3 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Purview

> see https://aka.ms/autorest

This is the AutoRest configuration file for Purview Distribution Service.

---

## Getting Started

To build the SDK for Purview Distribution Service, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`

To see additional help and options, run:

> `autorest --help`

---

## Configuration

### Basic Information

These are the global settings for the Purview Distribution Service API.

``` yaml
openapi-type: data-plane
tag: package-2023-01-01
title: PurviewPDSClient
```

### Tag: package-2022-11-01-preview

These settings apply only when `--tag=package-2022-11-01-preview` is specified on the command line.

``` yaml $(tag) == 'package-2022-11-01-preview'
input-file:
- preview/2022-11-01-preview/pds.json
```

### Tag: package-2023-01-01

These settings apply only when `--tag=package-2023-01-01` is specified on the command line.

``` yaml $(tag) == 'package-2023-01-01'
input-file:
- stable/2023-01-01/pds.json
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"scope": "/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/providers/microsoft.sql/servers/pansharm-sql",
"api-version": "2023-01-01"
},
"responses": {
"200": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
},
"body": {
"accountInfo": {
"id": "c528a5f7-cca5-42d6-b7ea-f5a4c5c91542",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"gatewayEndpoint": "https://api.purview.microsoft-ppe.com"
},
"frequency": "00:05:00",
"value": [
{
"kind": "Metadata",
"status": "Enabled"
},
{
"kind": "Governance",
"status": "Enabled"
}
]
}
},
"default": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
},
"body": {
"error": {
"code": "1001",
"message": "Simple error message.",
"target": "Detailed message or error trace.",
"details": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"scope": "/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/providers/microsoft.sql/servers/pansharm-sql",
"$filter": "atScope",
"api-version": "2023-01-01"
},
"responses": {
"200": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
},
"body": {
"syncToken": "25251:0",
"value": [
{
"id": "5f448cc9-33cc-47de-910c-c2de1212cb2f",
"kind": "Policy",
"updatedAt": "2022-04-12T09:43:35.4515155Z",
"version": 8,
"elementJson": "{\"id\":\"5f448cc9-33cc-47de-910c-c2de1212cb2f\",\"name\":\"test004\",\"kind\":\"policy\",\"version\":8,\"updatedAt\":\"2022-04-12T09:43:35.4515155Z\",\"decisionRules\":[{\"kind\":\"decisionrule\",\"effect\":\"Permit\",\"updatedAt\":\"04/12/2022 09:43:35\",\"cnfCondition\":[[{\"attributeName\":\"resource.azure.path\",\"attributeValueIncludedIn\":[\"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/providers/Microsoft.AzureArcData/SqlServerInstances/pansharm-sql/**\"]}],[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"ca4709b3-1fdd-4032-9844-3039025e8ee0\"]}],[{\"fromRule\":\"purviewdatarole_builtin_sqlperfmonitor\",\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewdatarole_builtin_sqlperfmonitor\"}]]}]}"
},
{
"id": "e870dcfa-d89d-4fc1-90a9-ef758d299e15",
"scopes": [
"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg"
],
"kind": "PolicySet",
"updatedAt": "2022-03-07T05:21:52.2823168Z",
"version": 1,
"elementJson": "{\"id\":\"e870dcfa-d89d-4fc1-90a9-ef758d299e15\",\"name\":\"e870dcfa-d89d-4fc1-90a9-ef758d299e15\",\"kind\":\"policyset\",\"version\":1,\"updatedAt\":\"2022-03-07T05:21:52.2823168Z\",\"preconditionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.azure.path\",\"attributeValueIncludedIn\":[\"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/**\"]}]]}],\"policyRefs\":[\"5f448cc9-33cc-47de-910c-c2de1212cb2f\"]}"
}
]
}
},
"default": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
},
"body": {
"error": {
"code": "1001",
"message": "Simple error message.",
"target": "Detailed message or error trace.",
"details": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parameters": {
"scope": "/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/providers/microsoft.sql/servers/pansharm-sql",
"syncToken": "25251:0",
"api-version": "2023-01-01"
},
"responses": {
"200": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
},
"body": {
"syncToken": "25258:0",
"value": [
{
"eventType": "Microsoft.Purview/PolicyElements/Write",
"id": "e870dcfa-d89d-4fc1-90a9-ef758d299e15",
"scopes": [
"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg"
],
"kind": "PolicySet",
"updatedAt": "2022-03-07T05:21:52.2823168Z",
"version": 1,
"elementJson": "{\"id\":\"e870dcfa-d89d-4fc1-90a9-ef758d299e15\",\"name\":\"e870dcfa-d89d-4fc1-90a9-ef758d299e15\",\"kind\":\"policyset\",\"version\":1,\"updatedAt\":\"2022-03-07T05:21:52.2823168Z\",\"preconditionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.azure.path\",\"attributeValueIncludedIn\":[\"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/**\"]}]]}],\"policyRefs\":[\"5f448cc9-33cc-47de-910c-c2de1212cb2f\"]}"
},
{
"eventType": "Microsoft.Purview/PolicyElements/Write",
"id": "5f448cc9-33cc-47de-910c-c2de1212cb2f",
"scopes": [
"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg"
],
"kind": "Policy",
"updatedAt": "2022-06-02T17:05:43.0981228Z",
"version": 9,
"elementJson": "{\"id\":\"5f448cc9-33cc-47de-910c-c2de1212cb2f\",\"name\":\"test004\",\"kind\":\"policy\",\"version\":9,\"updatedAt\":\"2022-06-02T17:05:43.0981228Z\",\"decisionRules\":[{\"kind\":\"decisionrule\",\"effect\":\"Permit\",\"id\":\"3ef47a19-55ab-4c3e-bfe4-b274489555da\",\"updatedAt\":\"06/02/2022 17:05:43\",\"cnfCondition\":[[{\"attributeName\":\"resource.azure.path\",\"attributeValueIncludedIn\":[\"/subscriptions/30d9d527-c409-4507-b861-d60e7fe9e292/resourcegroups/pansharm-rg/providers/Microsoft.AzureArcData/SqlServerInstances/pansharm-sql/**\"]}],[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"ca4709b3-1fdd-4032-9844-3039025e8ee0\"]}],[{\"fromRule\":\"purviewdatarole_builtin_sqlperfmonitor\",\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewdatarole_builtin_sqlperfmonitor\"}]]}]}"
}
]
}
},
"304": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
}
},
"default": {
"headers": {
"x-ms-correlation-request-id": "f35b289b-7deb-467b-9976-a163926f981f"
},
"body": {
"error": {
"code": "1001",
"message": "Simple error message.",
"target": "Detailed message or error trace.",
"details": []
}
}
}
}
}
Loading