-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[KeyVault Admin] Generated client #9668
Changes from all commits
71db5a3
c6e0ba6
bfabeaf
6f1915c
d89fde7
616ea94
73c2d29
45ae26e
3c9b11c
ef8b8ff
a6c9d89
31be09b
1849369
1567b7a
706ff3c
8347ac7
3caa5b3
edd0640
e7280be
babd011
2ecc626
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"plugins": ["@azure/azure-sdk"], | ||
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"], | ||
"ignorePatterns": ["src/generated"], | ||
"rules": { | ||
"@typescript-eslint/no-this-alias": "off", | ||
"no-invalid-this": "off", | ||
"@azure/azure-sdk/ts-package-json-module": "warn", | ||
"@azure/azure-sdk/ts-package-json-files-required": "warn" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/src/generated/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Release History | ||
|
||
## 1.0.0-preview.1 (Unreleased) | ||
|
||
- Produced the generated code for the administrative Key Vault tasks. It includes the backup and restore operations for whole Key Vault instances, and the role-based access control (RBAC) operations. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 Microsoft | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Azure Key Vault Admin client library for JavaScript | ||
|
||
Azure Key Vault is a service that allows you to encrypt authentication keys, storage account keys, data encryption keys, .pfx files, and passwords by using secured keys. | ||
If you would like to know more about Azure Key Vault, you may want to review: [What is Azure Key Vault?](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview) | ||
|
||
The package `@azure/keyvault-admin` provides support for the administrative Key Vault tasks. It includes the backup and restore operations for whole Key Vault instances, and the role-based access control (RBAC) operations. | ||
|
||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin) | [Package (npm)](https://www.npmjs.com/package/@azure/keyvault-admin) | [API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/keyvault-admin) | [Product documentation](https://azure.microsoft.com/en-us/services/key-vault/) | [Samples](./samples) | ||
|
||
## Getting started | ||
|
||
**Prerequisites**: You must have an [Azure subscription](https://azure.microsoft.com/free/) and a | ||
[Key Vault resource](https://docs.microsoft.com/en-us/azure/key-vault/quick-create-portal) to use this package. | ||
|
||
If you are using this package in a Node.js application, then use Node.js 8.x or higher. | ||
|
||
### Install the package | ||
|
||
Install the Azure Key Vault Admin client library using npm: | ||
|
||
`npm install @azure/keyvault-admin` | ||
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. Shouldn't this use a preview version, or is that not something you need to explicitly reference in npm? (I've used npm a lot, just never for prerelease semvers.) 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. Specifying preview is required if a non preview version was ever released before. Else, every new release gets the |
||
|
||
### Install the identity library | ||
|
||
Key Vault clients authenticate using the Azure Identity Library. Install it as well using npm | ||
|
||
`npm install @azure/identity` | ||
|
||
### Configure TypeScript | ||
|
||
TypeScript users need to have Node type definitions installed: | ||
|
||
```bash | ||
npm install @types/node | ||
``` | ||
|
||
You also need to enable `compilerOptions.allowSyntheticDefaultImports` in your tsconfig.json. Note that if you have enabled `compilerOptions.esModuleInterop`, `allowSyntheticDefaultImports` is enabled by default. See [TypeScript's compiler options handbook](https://www.typescriptlang.org/docs/handbook/compiler-options.html) for more information. | ||
|
||
### Configuring your Key Vault | ||
|
||
## Key concepts | ||
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. Nit: might add TODO comments here. Easy to find. 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. I'm not sure what it means to add comments on markdown. Just the 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. Up to you. Various IDEs have ways of enumerating TODOs as tasks, or it's easy to even just search for "TODO" in files to see what you may have forgotten to do otherwise. 😉 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. If it's up to me, I'll leave it as it is. I will make sure to match one to one with the other clients once we have budget to work on the convenience layer. |
||
|
||
## Authenticating with Azure Active Directory | ||
|
||
## Examples | ||
|
||
## Troubleshooting | ||
|
||
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: | ||
|
||
```javascript | ||
import { setLogLevel } from "@azure/logger"; | ||
|
||
setLogLevel("info"); | ||
``` | ||
|
||
## Next steps | ||
|
||
You can find more code samples through the following links: | ||
|
||
- [KeyVault Admin Samples (JavaScript)](./samples/javascript) | ||
- [KeyVault Admin Samples (TypeScript)](./samples/typescript) | ||
- [KeyVault Admin Test Cases](./test/) | ||
|
||
## Contributing | ||
|
||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. | ||
|
||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fkeyvault%2Fkeyvault-admin%2FREADME.png) |
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.
isn't this redundant with the entry in
.eslintignore
?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.
Good point! Thank you!
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.
Done here! 8347ac7