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 EligibleChildResources resource for PIM + update examples #13803

Merged
merged 44 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6ffc12b
PIM API Specs
amanswaika Jan 20, 2021
81addc2
update readme
amanswaika Jan 20, 2021
07d84d3
Update
amanswaika Jan 20, 2021
9041c3c
Update readme
amanswaika Jan 20, 2021
b4a1047
operation id fix
amanswaika Jan 22, 2021
8c712de
name fix
amanswaika Jan 22, 2021
176af50
Name changes
amanswaika Jan 22, 2021
dc658d4
fix
amanswaika Jan 22, 2021
de7937c
Fix
amanswaika Jan 22, 2021
1784514
Merge remote-tracking branch 'upstream/master'
amanswaika Jan 29, 2021
625d31b
Changes based on docs generated
amanswaika Jan 29, 2021
5cf107e
Scope fix in example
amanswaika Jan 29, 2021
936fe97
Updates for documentation
amanswaika Feb 3, 2021
9e3ee0b
Change operation name
amanswaika Feb 3, 2021
4b9a4a4
Update examples
amanswaika Mar 12, 2021
d308dd7
Merge branch 'master' into master
amanswaika Mar 12, 2021
95d3ca6
Add expanded properties
amanswaika Mar 16, 2021
b8f9c66
Merge branch 'master' of https://github.com/amanswaika/azure-rest-api…
amanswaika Mar 16, 2021
1eace71
Fix formatting
amanswaika Mar 16, 2021
9f1a813
Fixes
amanswaika Mar 16, 2021
7e35bfd
Fix
amanswaika Mar 16, 2021
0cf36f7
fixes
amanswaika Mar 16, 2021
ed4fdbe
Update the policy specs
Mar 17, 2021
3b9ee4b
Fix the policy objects and pell checks
Mar 17, 2021
737c402
fix the checks
Mar 17, 2021
05e1695
fix the property
Mar 17, 2021
0097bcd
fix syntax
Mar 17, 2021
77c0c34
Prettier
amanswaika Mar 17, 2021
87c0819
Merge branch 'master' of git://github.com/Azure/azure-rest-api-specs
amanswaika Apr 6, 2021
2c036db
Update Examples
amanswaika Apr 6, 2021
59ee67e
Update Enums
amanswaika Apr 6, 2021
48d0964
ADd eligible child resource API specs
amanswaika Apr 7, 2021
6e9852a
prettier fix
amanswaika Apr 7, 2021
cf58b3f
Update read me files
amanswaika Apr 9, 2021
bb7d130
update
amanswaika Apr 9, 2021
193a919
update
amanswaika Apr 9, 2021
02bb7ee
Merge branch 'master' into master
amanswaika Apr 9, 2021
af4b36f
fix
amanswaika Apr 9, 2021
e6edd77
update
amanswaika Apr 9, 2021
631a4cf
Update Enums
amanswaika Apr 9, 2021
275e3a2
update
amanswaika Apr 9, 2021
ef27dbd
update
amanswaika Apr 9, 2021
229cb31
update
amanswaika Apr 9, 2021
ae0720d
update example
amanswaika Apr 12, 2021
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,159 @@
{
"swagger": "2.0",
"info": {
"title": "AuthorizationManagementClient",
"version": "2020-10-01-preview",
"description": "Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role assignments. A role assignment grants access to Azure Active Directory users."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/{scope}/providers/Microsoft.Authorization/eligibleChildResources": {
"get": {
"tags": [
"eligibleChildResources"
],
"operationId": "EligibleChildResources_Get",
"description": "Get the child resources of a resource on which user has eligible access",
"parameters": [
{
"name": "scope",
"in": "path",
"required": true,
"type": "string",
"description": "The scope of the role management policy.",
"x-ms-skip-url-encoding": true
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup'"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the role management policy.",
"schema": {
"$ref": "#/definitions/EligibleChildResourcesListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"GetEligibleChildResourcesByScope": {
"$ref": "./examples/GetEligibleChildResourcesByScope.json"
}
}
}
}
},
"definitions": {
"EligibleChildResourcesListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/EligibleChildResource"
},
"description": "Eligible child resource list."
},
"nextLink": {
"type": "string",
"description": "The URL to use for getting the next set of results."
}
},
"description": "Eligible child resources list operation result."
},
"EligibleChildResource": {
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "The resource scope Id."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The resource name."
},
"type": {
"type": "string",
"readOnly": true,
"description": "The resource type."
}
},
"description": "Eligible child resource"
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "#/definitions/CloudErrorBody"
}
},
"description": "An error response from the service."
},
"CloudErrorBody": {
"x-ms-external": true,
"properties": {
"code": {
"type": "string",
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
},
"message": {
"type": "string",
"description": "A message describing the error, intended to be suitable for display in a user interface."
}
},
"description": "An error response from the service."
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The API version to use for this operation."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@
"enum": [
"User",
"Group",
"ServicePrincipal"
"ServicePrincipal",
"Unknown",
"DirectoryRoleTemplate",
"ForeignGroup",
"Application",
"MSI",
"DirectoryObjectOrGroup",
"Everyone",
"Device"
],
"x-ms-enum": {
"name": "PrincipalType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,15 @@
"enum": [
"User",
"Group",
"ServicePrincipal"
"ServicePrincipal",
"Unknown",
"DirectoryRoleTemplate",
"ForeignGroup",
"Application",
"MSI",
"DirectoryObjectOrGroup",
"Everyone",
"Device"
],
"x-ms-enum": {
"name": "PrincipalType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,15 @@
"enum": [
"User",
"Group",
"ServicePrincipal"
"ServicePrincipal",
"Unknown",
"DirectoryRoleTemplate",
"ForeignGroup",
"Application",
"MSI",
"DirectoryObjectOrGroup",
"Everyone",
"Device"
],
"x-ms-enum": {
"name": "PrincipalType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@
"enum": [
"User",
"Group",
"ServicePrincipal"
"ServicePrincipal",
"Unknown",
"DirectoryRoleTemplate",
"ForeignGroup",
"Application",
"MSI",
"DirectoryObjectOrGroup",
"Everyone",
"Device"
],
"x-ms-enum": {
"name": "PrincipalType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,15 @@
"enum": [
"User",
"Group",
"ServicePrincipal"
"ServicePrincipal",
"Unknown",
"DirectoryRoleTemplate",
"ForeignGroup",
"Application",
"MSI",
"DirectoryObjectOrGroup",
"Everyone",
"Device"
],
"x-ms-enum": {
"name": "PrincipalType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,15 @@
"enum": [
"User",
"Group",
"ServicePrincipal"
"ServicePrincipal",
"Unknown",
"DirectoryRoleTemplate",
"ForeignGroup",
"Application",
"MSI",
"DirectoryObjectOrGroup",
"Everyone",
"Device"
],
"x-ms-enum": {
"name": "PrincipalType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,9 @@
"type": "string",
"description": "The notification level.",
"enum": [
"NONE",
"CRITICAL",
"ALL"
"None",
amanswaika marked this conversation as resolved.
Show resolved Hide resolved
"Critical",
"All"
],
"x-ms-enum": {
"name": "NotificationLevel",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"api-version": "2020-10-01-preview",
"$filter": "resourceType+eq+'resourcegroup'"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "RG-1",
"id": "/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-1",
"type": "resourcegroup"
},
{
"name": "RG-2",
"id": "/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-2",
"type": "resourcegroup"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"expiration": {
"type": "AfterDuration",
"endDateTime": null,
"duration": "08:00:00"
"duration": "PT8H"
Copy link

@varunkumta varunkumta Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these changes just fixing bugs in the swagger examples, or has the service contract changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this to just fix examples. The service contract is the same.

}
},
"ticketInfo": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"expiration": {
"type": "AfterDuration",
"endDateTime": null,
"duration": "08:00:00"
"duration": "PT8H"
}
},
"ticketInfo": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"expiration": {
"type": "AfterDuration",
"endDateTime": null,
"duration": "365.00:00:00"
"duration": "P365D"
}
},
"ticketInfo": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"expiration": {
"type": "AfterDuration",
"endDateTime": null,
"duration": "365.00:00:00"
"duration": "P365D"
}
},
"ticketInfo": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"properties": {
"scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"policyId": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/RoleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"policyId": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"policyAssignmentProperties": {
"scope": {
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
Expand All @@ -23,7 +23,7 @@
"type": "BuiltInRole"
},
"policy": {
"id": "b959d571-f0b5-4042-88a7-01be6cb22db9",
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"lastModifiedBy": {
"id": null,
"displayName": "Admin",
Expand All @@ -35,7 +35,7 @@
}
},
"name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"id": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/RoleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"id": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"type": "Microsoft.Authorization/RoleManagementPolicyAssignment"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"properties": {
"scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"policyId": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/RoleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"policyId": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"policyAssignmentProperties": {
"scope": {
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
Expand All @@ -24,7 +24,7 @@
"type": "BuiltInRole"
},
"policy": {
"id": "b959d571-f0b5-4042-88a7-01be6cb22db9",
"id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9",
"lastModifiedBy": {
"id": null,
"displayName": "Admin",
Expand All @@ -36,7 +36,7 @@
}
},
"name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"id": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/RoleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"id": "/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
"type": "Microsoft.Authorization/RoleManagementPolicyAssignment"
}
]
Expand Down
Loading