use of com.sequenceiq.environment.api.v1.platformresource.model.AccessConfigTypeQueryParam in project cloudbreak by hortonworks.
the class CredentialPlatformResourceController method getAccessConfigs.
@Override
@CustomPermissionCheck
public PlatformAccessConfigsResponse getAccessConfigs(String credentialName, String credentialCrn, String region, String platformVariant, String availabilityZone, AccessConfigTypeQueryParam accessConfigType) {
customCheckUtil.run(() -> permissionCheckByCredential(credentialName, credentialCrn));
String accountId = getAccountId();
PlatformResourceRequest request = platformParameterService.getPlatformResourceRequest(accountId, credentialName, credentialCrn, region, platformVariant, availabilityZone, null, accessConfigType);
LOGGER.info("Get /platform_resources/access_configs, request: {}", request);
CloudAccessConfigs accessConfigs = platformParameterService.getAccessConfigs(request);
PlatformAccessConfigsResponse response = cloudAccessConfigsToPlatformAccessConfigsV1ResponseConverter.convert(accessConfigs);
LOGGER.info("Resp /platform_resources/access_configs, request: {}, accessConfigs: {}, response: {}", request, accessConfigs, response);
return response;
}
use of com.sequenceiq.environment.api.v1.platformresource.model.AccessConfigTypeQueryParam in project cloudbreak by hortonworks.
the class EnvironmentPlatformResourceController method getAccessConfigs.
@Override
@CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT)
public PlatformAccessConfigsResponse getAccessConfigs(@ResourceCrn String environmentCrn, String region, String platformVariant, String availabilityZone, AccessConfigTypeQueryParam accessConfigType) {
String accountId = getAccountId();
validateEnvironmentCrnPattern(environmentCrn);
PlatformResourceRequest request = platformParameterService.getPlatformResourceRequestByEnvironment(accountId, environmentCrn, region, platformVariant, availabilityZone, null, accessConfigType);
LOGGER.info("Get /platform_resources/access_configs, request: {}", request);
CloudAccessConfigs accessConfigs = platformParameterService.getAccessConfigs(request);
PlatformAccessConfigsResponse response = cloudAccessConfigsToPlatformAccessConfigsV1ResponseConverter.convert(accessConfigs);
LOGGER.info("Resp /platform_resources/access_configs, request: {}, accessConfigs: {}, response: {}", request, accessConfigs, response);
return response;
}
Aggregations