diff --git a/sdk/keyvault/cleanup/CMakeLists.txt b/sdk/keyvault/tools/cleanup/CMakeLists.txt similarity index 96% rename from sdk/keyvault/cleanup/CMakeLists.txt rename to sdk/keyvault/tools/cleanup/CMakeLists.txt index 46379193d..17dc0cec3 100644 --- a/sdk/keyvault/cleanup/CMakeLists.txt +++ b/sdk/keyvault/tools/cleanup/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) add_executable ( cleanup-keyvault - cleanup.cpp + src/cleanup.cpp ) create_per_service_target_build_for_sample(keyvault cleanup-keyvault) diff --git a/sdk/keyvault/tools/cleanup/LICENSE b/sdk/keyvault/tools/cleanup/LICENSE new file mode 100644 index 000000000..51b6a76e5 --- /dev/null +++ b/sdk/keyvault/tools/cleanup/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + 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. diff --git a/sdk/keyvault/tools/cleanup/README.md b/sdk/keyvault/tools/cleanup/README.md new file mode 100644 index 000000000..6cc5f7826 --- /dev/null +++ b/sdk/keyvault/tools/cleanup/README.md @@ -0,0 +1,6 @@ +# Get Environment Variable for Samples + +This is an tool that helps cleanup key vault resources. +It lists and then starts the delete process on keys secrets and certificates. +Once that is done it will call purge on the deleted resources. +While on large number of resources present in the key vault it might take a while , and be slower than deleting and recreating a key vault resource, it helps not having to reconfigure and update the connection settings. diff --git a/sdk/keyvault/cleanup/cleanup.cpp b/sdk/keyvault/tools/cleanup/src/cleanup.cpp similarity index 100% rename from sdk/keyvault/cleanup/cleanup.cpp rename to sdk/keyvault/tools/cleanup/src/cleanup.cpp