Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(dedicated.cloud): add VM encryption KMS routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémy DE CESARE committed Oct 2, 2018
1 parent 9d685dd commit a53f50d
Showing 1 changed file with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,41 @@ angular.module("ovh-api-services").service("OvhApiDedicatedCloudVMEncryptionKmsV

var queryCache = $cacheFactory("OvhApiDedicatedCloudVMEncryptionKmsV6Query");
var cache = $cacheFactory("OvhApiDedicatedCloudVMEncryptionKmsV6");
var interceptor = function (response) {
cache.remove(response.config.url);
queryCache.removeAll();
return response;
};

var kmsResource = $resource("/dedicatedCloud/:serviceName/vmEncryption/kms/:kmsId", {
serviceName: "@serviceName",
kmsId: "@kmsId"
}, {
query: { method: "GET", cache: queryCache, isArray: true },
get: { method: "GET", cache: cache }
get: { method: "GET", cache: cache },
create: {
method: "POST",
url: "/dedicatedCloud/:serviceName/vmEncryption/kms",
params: {
ip: "@ip",
description: "@description",
sslThumbprint: "@sslThumbprint"
},
interceptor: interceptor
},
changeProperties: {
method: "POST",
url: "/dedicatedCloud/:serviceName/vmEncryption/kms/:kmsId/changeProperties",
params: {
description: "@description",
sslThumbprint: "@sslThumbprint"
},
interceptor: interceptor
},
"delete": {
method: "DELETE",
interceptor: interceptor
}
});

kmsResource.resetQueryCache = function () {
Expand Down

0 comments on commit a53f50d

Please sign in to comment.