@cloudchipr/cloudchipr-engine
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -26,2 +26,3 @@ import { EngineRequest } from '../../engine-request'; | ||
getSnapshot(request: GetSnapshotInterface): Promise<string>; | ||
getActions(clientRoleName: string): Promise<any>; | ||
} |
@@ -95,4 +95,13 @@ "use strict"; | ||
}; | ||
AWSSDKEngineAdapter.prototype.getActions = function (clientRoleName) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var awsClient; | ||
return __generator(this, function (_a) { | ||
awsClient = new aws_client_1.default(this.credentials); | ||
return [2 /*return*/, awsClient.getActions(clientRoleName)]; | ||
}); | ||
}); | ||
}; | ||
return AWSSDKEngineAdapter; | ||
}()); | ||
exports.AWSSDKEngineAdapter = AWSSDKEngineAdapter; |
@@ -23,4 +23,5 @@ import { CredentialProvider } from '@aws-sdk/types'; | ||
getSnapshot(request: GetSnapshotInterface): Promise<any>; | ||
getActions(clientRoleName: string): Promise<any>; | ||
private getAwsClient; | ||
private getAwsClientForSnapshot; | ||
} |
@@ -56,2 +56,3 @@ "use strict"; | ||
var create_snapshot_success_response_1 = require("../../../responses/create-snapshot-success-response"); | ||
var aws_permission_1 = require("./aws-permission"); | ||
var AwsClient = /** @class */ (function () { | ||
@@ -208,2 +209,12 @@ function AwsClient(credentialProvider) { | ||
}; | ||
AwsClient.prototype.getActions = function (clientRoleName) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, aws_permission_1.AwsPermission.getAllActions(this.credentialProvider, clientRoleName)]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
AwsClient.prototype.getAwsClient = function (subcommand) { | ||
@@ -210,0 +221,0 @@ switch (subcommand) { |
@@ -18,4 +18,6 @@ import { Response } from '../../../responses/response'; | ||
getSnapshot(request: GetSnapshotInterface): Promise<any>; | ||
getPrincipalRoles(): Promise<any>; | ||
getEnabledServices(): Promise<any>; | ||
private getClient; | ||
private getClientForSnapshot; | ||
} |
@@ -56,2 +56,3 @@ "use strict"; | ||
var gcp_container_client_1 = require("./gcp-container-client"); | ||
var gcp_service_client_1 = require("./gcp-service-client"); | ||
var GcpClient = /** @class */ (function () { | ||
@@ -183,2 +184,22 @@ function GcpClient(authClient, projectId) { | ||
}; | ||
GcpClient.prototype.getPrincipalRoles = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, gcp_service_client_1.GcpServiceClient.getPrincipalRoles(this.authClient, this.projectId)]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
GcpClient.prototype.getEnabledServices = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, gcp_service_client_1.GcpServiceClient.getEnabledServices(this.authClient, this.projectId)]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
GcpClient.prototype.getClient = function (subcommand) { | ||
@@ -185,0 +206,0 @@ switch (subcommand) { |
@@ -20,2 +20,4 @@ import { EngineRequest } from '../../engine-request'; | ||
getSnapshot(request: GetSnapshotInterface, projectId: string): Promise<string>; | ||
getPrincipalRoles(projectId: string): Promise<any>; | ||
getEnabledServices(projectId: string): Promise<any>; | ||
} |
@@ -85,4 +85,22 @@ "use strict"; | ||
}; | ||
GcpSdkEngineAdapter.prototype.getPrincipalRoles = function (projectId) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var gcpClient; | ||
return __generator(this, function (_a) { | ||
gcpClient = new gcp_client_1.GcpClient(this.authClient, projectId); | ||
return [2 /*return*/, gcpClient.getPrincipalRoles()]; | ||
}); | ||
}); | ||
}; | ||
GcpSdkEngineAdapter.prototype.getEnabledServices = function (projectId) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var gcpClient; | ||
return __generator(this, function (_a) { | ||
gcpClient = new gcp_client_1.GcpClient(this.authClient, projectId); | ||
return [2 /*return*/, gcpClient.getEnabledServices()]; | ||
}); | ||
}); | ||
}; | ||
return GcpSdkEngineAdapter; | ||
}()); | ||
exports.GcpSdkEngineAdapter = GcpSdkEngineAdapter; |
{ | ||
"name": "@cloudchipr/cloudchipr-engine", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Cloudchipr engine", | ||
@@ -31,2 +31,3 @@ "main": "lib/index.js", | ||
"@aws-sdk/client-elasticache": "^3.180.0", | ||
"@aws-sdk/client-iam": "^3.194.0", | ||
"@aws-sdk/client-organizations": "^3.42.0", | ||
@@ -33,0 +34,0 @@ "@aws-sdk/client-pricing": "^3.121.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
610525
254
11904
16
+ Added@aws-sdk/client-iam@^3.194.0
+ Added@aws-sdk/client-iam@3.658.1(transitive)