Skip to content

Commit 0fec5e4

Browse files
Added resource property to decision model
1 parent 085ba05 commit 0fec5e4

File tree

10 files changed

+145
-42
lines changed

10 files changed

+145
-42
lines changed

specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-03-01-preview/authorization-AccessReviewCalls.json

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,11 +1440,17 @@
14401440
},
14411441
"AccessReviewDecisionProperties": {
14421442
"properties": {
1443-
"target": {
1443+
"principal": {
14441444
"readOnly": true,
14451445
"x-ms-client-flatten": true,
1446-
"$ref": "#/definitions/AccessReviewDecisionTarget",
1447-
"description": "Target of this decision record. Can be UserDecisionTarget or ServicePrincipalDecisionTarget"
1446+
"$ref": "#/definitions/AccessReviewDecisionIdentity",
1447+
"description": "Principal associated with the decision record. Can be AccessReviewDecisionUserIdentity or AccessReviewDecisionServicePrincipalIdentity"
1448+
},
1449+
"resource": {
1450+
"readOnly": true,
1451+
"x-ms-client-flatten": true,
1452+
"$ref": "#/definitions/AccessReviewDecisionResource",
1453+
"description": "Resource associated with this decision record."
14481454
},
14491455
"recommendation": {
14501456
"type": "string",
@@ -1525,7 +1531,37 @@
15251531
},
15261532
"description": "Approval Step."
15271533
},
1528-
"AccessReviewDecisionTarget": {
1534+
"AccessReviewDecisionResource": {
1535+
"discriminator": "type",
1536+
"required": [
1537+
"type"
1538+
],
1539+
"properties": {
1540+
"type": {
1541+
"type": "string",
1542+
"description": "The type of resource",
1543+
"enum": [
1544+
"azureRole"
1545+
],
1546+
"x-ms-enum": {
1547+
"name": "DecisionResourceType",
1548+
"modelAsString": true
1549+
}
1550+
},
1551+
"id": {
1552+
"type": "string",
1553+
"readOnly": true,
1554+
"description": "The id of resource associated with a decision record."
1555+
},
1556+
"displayName": {
1557+
"type": "string",
1558+
"readOnly": true,
1559+
"description": "The display name of resource associated with a decision record."
1560+
}
1561+
},
1562+
"description": "Target of the decision."
1563+
},
1564+
"AccessReviewDecisionIdentity": {
15291565
"discriminator": "type",
15301566
"required": [
15311567
"type"
@@ -1542,32 +1578,32 @@
15421578
"name": "DecisionTargetType",
15431579
"modelAsString": true
15441580
}
1581+
},
1582+
"id": {
1583+
"type": "string",
1584+
"readOnly": true,
1585+
"description": "The id of principal whose access was reviewed."
1586+
},
1587+
"displayName": {
1588+
"type": "string",
1589+
"readOnly": true,
1590+
"description": "The display name of the user whose access was reviewed."
15451591
}
15461592
},
15471593
"description": "Target of the decision."
15481594
},
1549-
"UserDecisionTarget": {
1595+
"AccessReviewDecisionUserIdentity": {
15501596
"allOf": [
15511597
{
1552-
"$ref": "#/definitions/AccessReviewDecisionTarget"
1598+
"$ref": "#/definitions/AccessReviewDecisionIdentity"
15531599
},
15541600
{
15551601
"type": "object",
1556-
"description": "UserDecisionTarget"
1602+
"description": "AccessReviewDecisionUserIdentity"
15571603
}
15581604
],
15591605
"x-ms-discriminator-value": "user",
15601606
"properties": {
1561-
"principalId": {
1562-
"type": "string",
1563-
"readOnly": true,
1564-
"description": "The id of user whose access was reviewed."
1565-
},
1566-
"principalName": {
1567-
"type": "string",
1568-
"readOnly": true,
1569-
"description": "The display name of the user whose access was reviewed."
1570-
},
15711607
"userPrincipalName": {
15721608
"type": "string",
15731609
"readOnly": true,
@@ -1576,28 +1612,18 @@
15761612
},
15771613
"description": "User Decision Target"
15781614
},
1579-
"ServicePrincipalDecisionTarget": {
1615+
"AccessReviewDecisionServicePrincipalIdentity": {
15801616
"allOf": [
15811617
{
1582-
"$ref": "#/definitions/AccessReviewDecisionTarget"
1618+
"$ref": "#/definitions/AccessReviewDecisionIdentity"
15831619
},
15841620
{
15851621
"type": "object",
1586-
"description": "ServicePrincipalDecisionTarget"
1622+
"description": "AccessReviewDecisionServicePrincipalIdentity"
15871623
}
15881624
],
15891625
"x-ms-discriminator-value": "servicePrincipal",
15901626
"properties": {
1591-
"principalId": {
1592-
"type": "string",
1593-
"readOnly": true,
1594-
"description": "The id of service principal whose access is reviewed."
1595-
},
1596-
"principalName": {
1597-
"type": "string",
1598-
"readOnly": true,
1599-
"description": "The display name of the service principal whose access was reviewed."
1600-
},
16011627
"appId": {
16021628
"type": "string",
16031629
"readOnly": true,

specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-03-01-preview/examples/GetAccessReviewInstanceDecisions.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,16 @@
3232
"appliedDateTime": "2018-10-03T21:02:30.667Z",
3333
"applyResult": "Success",
3434
"recommendation": "Deny",
35-
"target": {
35+
"principal": {
3636
"type": "user",
37-
"principalId": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
38-
"principalName": "Shubham Gupta",
37+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
38+
"displayName": "Shubham Gupta",
3939
"userPrincipalName": "[email protected]"
40+
},
41+
"resource": {
42+
"type": "azureRole",
43+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
44+
"displayName": "Owner"
4045
}
4146
}
4247
}

specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-03-01-preview/examples/GetAccessReviewInstanceMyDecisionById.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@
3030
"appliedDateTime": "2018-10-03T21:02:30.667Z",
3131
"applyResult": "Success",
3232
"recommendation": "Deny",
33-
"target": {
33+
"principal": {
3434
"type": "user",
35-
"principalId": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
36-
"principalName": "Shubham Gupta",
35+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
36+
"displayName": "Shubham Gupta",
3737
"userPrincipalName": "[email protected]"
38+
},
39+
"resource": {
40+
"type": "azureRole",
41+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
42+
"displayName": "Owner"
3843
}
3944
}
4045
}

specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-03-01-preview/examples/GetAccessReviewInstanceMyDecisions.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,16 @@
3131
"appliedDateTime": "2018-10-03T21:02:30.667Z",
3232
"applyResult": "Success",
3333
"recommendation": "Deny",
34-
"target": {
34+
"principal": {
3535
"type": "user",
36-
"principalId": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
37-
"principalName": "Shubham Gupta",
36+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
37+
"displayName": "Shubham Gupta",
3838
"userPrincipalName": "[email protected]"
39+
},
40+
"resource": {
41+
"type": "azureRole",
42+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
43+
"displayName": "Owner"
3944
}
4045
}
4146
}

specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-03-01-preview/examples/PatchAccessReviewInstanceMyDecisionById.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@
3737
"appliedDateTime": "2018-10-03T21:02:30.667Z",
3838
"applyResult": "Success",
3939
"recommendation": "Deny",
40-
"target": {
40+
"principal": {
4141
"type": "user",
42-
"principalId": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
43-
"principalName": "Shubham Gupta",
42+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
43+
"displayName": "Shubham Gupta",
4444
"userPrincipalName": "[email protected]"
45+
},
46+
"resource": {
47+
"type": "azureRole",
48+
"id": "a6c7aecb-cbfd-4763-87ef-e91b4bd509d9",
49+
"displayName": "Owner"
4550
}
4651
}
4752
}

specification/authorization/resource-manager/readme.azureresourceschema.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ These settings apply only when `--azureresourceschema` is specified on the comma
66

77
``` yaml $(azureresourceschema) && $(multiapi)
88
batch:
9+
- tag: schema-authorization-2021-03-01-preview
910
- tag: schema-authorization-2021-01-01-preview
1011
- tag: schema-authorization-2020-10-01-preview
1112
- tag: schema-authorization-2020-04-01-preview
@@ -21,6 +22,17 @@ batch:
2122

2223
Please also specify `--azureresourceschema-folder=<path to the root directory of your azure-resource-manager-schemas clone>`.
2324

25+
### Tag: schema-authorization-2021-03-01-preview and azureresourceschema
26+
27+
``` yaml $(tag) == 'schema-authorization-2021-03-01-preview' && $(azureresourceschema)
28+
output-folder: $(azureresourceschema-folder)/schemas
29+
30+
# all the input files in this apiVersion
31+
input-file:
32+
- Microsoft.Authorization/preview/2021-03-01-preview/authorization-AccessReviewCalls.json
33+
34+
```
35+
2436
### Tag: schema-authorization-2020-10-01-preview and azureresourceschema
2537

2638
``` yaml $(tag) == 'schema-authorization-2020-10-01-preview' && $(azureresourceschema)

specification/authorization/resource-manager/readme.java.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ batch:
2121
- tag: package-2015-06-01-preview
2222
- tag: package-2018-05-01-preview
2323
- tag: package-2021-01-01-preview-only
24+
- tag: package-2021-03-01-preview-only
25+
```
26+
27+
### Tag: package-2021-03-01-preview-only and java
28+
29+
These settings apply only when `--tag=package-2021-03-01-preview-only --java` is specified on he command line.
30+
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-sdk-for-java clone>`.
31+
32+
``` yaml $(tag) == 'package-2021-03-01-preview-only' && $(java) && $(multiapi)
33+
java:
34+
namespace: com.microsoft.azure.management.authorization.v2021_03_01_preview
35+
output-folder: $(azure-libraries-for-java-folder)/sdk/authorization/mgmt-v2021_03_01_preview
36+
regenerate-manager: true
37+
generate-interface: true
2438
```
2539

2640
### Tag: package-2018-09-01-preview and java

specification/authorization/resource-manager/readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ directive:
7575
reason: Existing APIs don't have this attribute. Suppressing so that we don't have to make changes to existing APIs
7676
```
7777
78+
### Tag: package-2021-03-01-preview-only
79+
80+
These settings apply only when `--tag=package-2021-03-01-preview-only` is specified on the command line.
81+
82+
``` yaml $(tag) == 'package-2021-03-01-preview-only'
83+
input-file:
84+
- Microsoft.Authorization/preview/2021-03-01-preview/authorization-AccessReviewCalls.json
85+
```
86+
7887
### Tag: package-2020-10-01-preview
7988

8089
These settings apply only when `--tag=package-2020-10-01-preview` is specified on the command line.

specification/authorization/resource-manager/readme.python.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Generate all API versions currently shipped for this package
2121
2222
```yaml $(python) && $(multiapi)
2323
batch:
24+
- tag: package-2021-03-01-preview-only
2425
- tag: package-2021-01-01-preview-only
2526
- tag: package-2020-04-01-preview-only
2627
- tag: package-2018-09-01-preview-only
@@ -31,6 +32,16 @@ batch:
3132
- tag: package-2015-06-01-preview
3233
```
3334
35+
### Tag: package-2021-03-01-preview-only and python
36+
37+
These settings apply only when `--tag=package-2021-03-01-preview-only --python` is specified on the command line.
38+
39+
``` yaml $(tag) == 'package-2021-03-01-preview-only' && $(python)
40+
python:
41+
namespace: azure.mgmt.authorization.v2021_03_01_preview
42+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_03_01_preview
43+
```
44+
3445
### Tag: package-2020-04-01-preview-only and python
3546

3647
These settings apply only when `--tag=package-2020-04-01-preview-only --python` is specified on the command line.

specification/authorization/resource-manager/readme.ruby.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ batch:
1818
- tag: package-2018-01-01-preview-only
1919
- tag: package-2018-05-01-preview-only
2020
- tag: package-2021-01-01-preview-only
21+
- tag: package-2021-03-01-preview-only
2122
```
2223
2324
### Tag: package-2015-07-01 and ruby
@@ -80,3 +81,13 @@ Please also specify `--ruby-sdks-folder=<path to the root directory of your azur
8081
namespace: "Azure::Authorization::Mgmt::V2021_01_01_preview"
8182
output-folder: $(ruby-sdks-folder)/management/azure_mgmt_authorization/lib
8283
```
84+
85+
### Tag: package-2021-03-01-preview-only and ruby
86+
87+
These settings apply only when `--tag=package-2021-03-01-preview-only --ruby` is specified on the command line.
88+
Please also specify `--ruby-sdks-folder=<path to the root directory of your azure-sdk-for-ruby clone>`.
89+
90+
``` yaml $(tag) == 'package-2021-03-01-preview-only' && $(ruby)
91+
namespace: "Azure::Authorization::Mgmt::V2021_03_01_preview"
92+
output-folder: $(ruby-sdks-folder)/management/azure_mgmt_authorization/lib
93+
```

0 commit comments

Comments
 (0)