-
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 all commits
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
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "$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,113 @@ | ||
| ## 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 | ||
| export interface AccessControlClientOptions extends coreHttp.PipelineOptions { | ||
| serviceVersion?: SUPPORTED_API_VERSIONS; | ||
| } | ||
|
|
||
| // @public | ||
| export interface CreateRoleAssignmentOptions extends coreHttp.OperationOptions { | ||
| } | ||
|
|
||
| // @public | ||
| export interface DeleteRoleAssignmentOptions extends coreHttp.OperationOptions { | ||
| } | ||
|
|
||
| // @public | ||
| export interface GetRoleAssignmentOptions extends coreHttp.OperationOptions { | ||
| } | ||
|
|
||
| // @public | ||
| export class KeyVaultAccessControlClient { | ||
| constructor(vaultUrl: string, credential: TokenCredential, pipelineOptions?: AccessControlClientOptions); | ||
| createRoleAssignment(roleScope: RoleAssignmentScope, name: string, roleDefinitionId: string, principalId: string, options?: CreateRoleAssignmentOptions): Promise<KeyVaultRoleAssignment>; | ||
| deleteRoleAssignment(roleScope: RoleAssignmentScope, name: string, options?: DeleteRoleAssignmentOptions): Promise<KeyVaultRoleAssignment>; | ||
sadasant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| getRoleAssignment(roleScope: RoleAssignmentScope, name: string, options?: GetRoleAssignmentOptions): Promise<KeyVaultRoleAssignment>; | ||
| listRoleAssignments(roleScope: RoleAssignmentScope, options?: ListRoleAssignmentsOptions): PagedAsyncIterableIterator<KeyVaultRoleAssignment>; | ||
| listRoleDefinitions(roleScope: RoleAssignmentScope, options?: ListRoleDefinitionsOptions): PagedAsyncIterableIterator<KeyVaultRoleDefinition>; | ||
| readonly vaultUrl: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface KeyVaultPermission { | ||
sadasant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| actions?: string[]; | ||
| dataActions?: string[]; | ||
| notActions?: string[]; | ||
| notDataActions?: string[]; | ||
| } | ||
|
|
||
| // @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; | ||
|
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. for python we have
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. .Net has Id: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs#L121 cc: @christothes what should we use? who should we ask?
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. IMO - |
||
| readonly name: string; | ||
| properties: KeyVaultRoleAssignmentPropertiesWithScope; | ||
| readonly type: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface KeyVaultRoleAssignmentProperties { | ||
| principalId: string; | ||
| roleDefinitionId: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface KeyVaultRoleAssignmentPropertiesWithScope { | ||
| principalId: string; | ||
| roleDefinitionId: string; | ||
| scope?: RoleAssignmentScope; | ||
| } | ||
|
|
||
| // @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: KeyVaultPermission[]; | ||
| roleName: string; | ||
| roleType: string; | ||
| readonly type: string; | ||
| } | ||
|
|
||
| // @public | ||
| export const LATEST_API_VERSION = "7.2-preview"; | ||
|
|
||
| // @public | ||
| export interface ListRoleAssignmentsOptions extends coreHttp.OperationOptions { | ||
| } | ||
|
|
||
| // @public | ||
| export interface ListRoleAssignmentsPageSettings { | ||
| continuationToken?: string; | ||
| } | ||
|
|
||
| // @public | ||
| export interface ListRoleDefinitionsOptions extends coreHttp.OperationOptions { | ||
| } | ||
|
|
||
| // @public | ||
| export interface ListRoleDefinitionsPageSettings { | ||
| continuationToken?: string; | ||
| } | ||
|
|
||
| // @public | ||
| export type RoleAssignmentScope = "/" | "/keys" | string; | ||
|
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. this feels like a weird type, though I'm not sure what would be better
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. The string part is because it accepts UUIDs. I wonder if we could have some UUID validator as a type? That would be generally helpful in our clients. |
||
|
|
||
| // @public | ||
| export const SDK_VERSION: string; | ||
|
|
||
| // @public | ||
| export type SUPPORTED_API_VERSIONS = "7.2-preview"; | ||
|
|
||
|
|
||
| // (No @packageDocumentation comment for this package) | ||
|
|
||
| ``` | ||
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.
in python we have it as
role_assignment_nameThere 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.
same for every name parameter for role assignments
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.
.Net is using
name. I don't mind, but I'd rather reach to an agreement with @heaths , @christothes