-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Key Vault Admin] Convenience layer - KeyVaultAccessControlClient #10815
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
Changes from 1 commit
7c3cfc5
28b4eb6
eb9cbe0
a5524f5
167935d
44e9eb3
3790bd1
2188a87
60f4bd3
ac414c9
9e5505a
57fd102
0ce383e
7f179ef
8919a93
ee1d71e
b7d3bf5
26e9583
a10a592
09148fd
1b0f642
4513d72
6ab4ae1
7c845ca
9030441
18d7911
74b7bfc
ca12be4
e306ff4
d61f0b6
64a5d1d
1386365
590a835
23431cc
66bcdd4
8484177
24380a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
| "mainEntryPointFilePath": "types/keyvault-admin/src/index.d.ts", | ||
| "docModel": { | ||
| "enabled": true | ||
| }, | ||
| "apiReport": { | ||
| "enabled": true, | ||
| "reportFolder": "./review" | ||
| }, | ||
| "dtsRollup": { | ||
| "enabled": true, | ||
| "untrimmedFilePath": "", | ||
| "publicTrimmedFilePath": "./types/keyvault-admin.d.ts" | ||
| }, | ||
| "messages": { | ||
| "tsdocMessageReporting": { | ||
| "default": { | ||
| "logLevel": "none" | ||
| } | ||
| }, | ||
| "extractorMessageReporting": { | ||
| "ae-missing-release-tag": { | ||
| "logLevel": "none" | ||
| }, | ||
| "ae-unresolved-link": { | ||
| "logLevel": "none" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| ## API Report File for "@azure/keyvault-admin" | ||
|
|
||
| > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
|
|
||
| ```ts | ||
|
|
||
| import * as coreHttp from '@azure/core-http'; | ||
| import { PagedAsyncIterableIterator } from '@azure/core-paging'; | ||
| import { TokenCredential } from '@azure/core-http'; | ||
|
|
||
| // @public (undocumented) | ||
| export class AccessControlClient { | ||
| constructor(vaultUrl: string, credential: TokenCredential, pipelineOptions?: AccessControlClientOptions); | ||
| createRoleAssignment(scope: RoleAssignmentScope, name: string, options?: CreateRoleAssignmentOptions): Promise<KeyVaultRoleAssignment>; | ||
sadasant marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| deleteRoleAssignment(scope: RoleAssignmentScope, name: string, options?: DeleteRoleAssignmentOptions): Promise<KeyVaultRoleAssignment>; | ||
| getRoleAssignment(scope: RoleAssignmentScope, name: string, options?: DeleteRoleAssignmentOptions): Promise<KeyVaultRoleAssignment>; | ||
| listRoleAssignments(scope: RoleAssignmentScope, options?: ListRoleAssignmentsOptions): PagedAsyncIterableIterator<KeyVaultRoleAssignment>; | ||
| listRoleDefinitions(scope: RoleAssignmentScope, options?: ListRoleDefinitionsOptions): PagedAsyncIterableIterator<KeyVaultRoleDefinition>; | ||
| readonly vaultUrl: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface AccessControlClientOptions extends coreHttp.PipelineOptions { | ||
| serviceVersion?: SUPPORTED_API_VERSIONS; | ||
| } | ||
|
|
||
| // @public | ||
| export interface CreateRoleAssignmentOptions extends coreHttp.OperationOptions { | ||
| properties?: RoleAssignmentProperties; | ||
| } | ||
|
|
||
| // @public | ||
| export interface DeleteRoleAssignmentOptions extends coreHttp.OperationOptions { | ||
| } | ||
|
|
||
| // @public | ||
| export interface KeyVaultRoleAssignment { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before I do this change, let's argue about prefixes here: #10815 (comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @heaths I'm assuming KeyVaultRoleAssignment is favored after that conversation I mentioned ^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. python has |
||
| readonly id?: string; | ||
| readonly name?: string; | ||
| properties?: RoleAssignmentPropertiesWithScope; | ||
| readonly type?: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface KeyVaultRoleDefinition { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before I do this change, let's argue about prefixes here: #10815 (comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @heaths I'm assuming KeyVaultRoleDefinition is favored after that conversation I mentioned ^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. python has |
||
| assignableScopes?: string[]; | ||
| description?: string; | ||
| readonly id?: string; | ||
| readonly name?: string; | ||
| permissions?: RoleDefinitionPermission[]; | ||
|
||
| roleName?: string; | ||
| roleType?: string; | ||
| readonly type?: string; | ||
sadasant marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // @public | ||
| export const LATEST_API_VERSION = "7.1"; | ||
|
|
||
| // @public | ||
| export interface ListRoleAssignmentsOptions extends coreHttp.OperationOptions { | ||
| filter?: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface ListRoleDefinitionsOptions extends coreHttp.OperationOptions { | ||
| filter?: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface RoleAssignmentProperties { | ||
| principalId?: string; | ||
| roleDefinitionId?: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface RoleAssignmentPropertiesWithScope extends RoleAssignmentProperties { | ||
| scope?: RoleAssignmentScope; | ||
| } | ||
|
|
||
| // @public | ||
| export type RoleAssignmentScope = "/" | "/keys"; | ||
sadasant marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // @public | ||
| export interface RoleDefinitionPermission { | ||
| actions?: string[]; | ||
| dataActions?: string[]; | ||
| notActions?: string[]; | ||
| notDataActions?: string[]; | ||
| } | ||
|
|
||
| // @public | ||
| export const SDK_VERSION: string; | ||
|
|
||
| // @public | ||
| export type SUPPORTED_API_VERSIONS = "7.0" | "7.1" | "7.2-preview"; | ||
sadasant marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| // (No @packageDocumentation comment for this package) | ||
|
|
||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| export * from "./accessControlClient"; | ||
| export * from "./accessControlClient"; | ||
| export * from "./accessControlModels"; | ||
| export * from "./constants"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion below, the principalId and roleDefinitionId (?) should be parameters. Same goes for any required parameters in other methods that follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated this by this point, to be:
Note that I used
roleDefinitionIdfirst, thenprincipalId, since I believe that the former one has a smaller scope than the later one, so I'm trying to go from micro to macro, scope-wise. Does this make sense? I can change it, I won't push back, but this is my argument for my current approach.Wait, what other methods have these as the required parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only methods that have these properties in .Net are: CreateRoleAssignment, and CreateRoleAssignmentAsync.