@Test public void testGetResourceRoleCrn() { Crn testRole1 = underTest.getResourceRoleCrn(TEST_ROLE_1); Crn testRole2 = underTest.getResourceRoleCrn(TEST_ROLE_2); assertEquals(ACCOUNT_ID, testRole1.getAccountId()); assertEquals(TEST_ROLE_1, testRole1.getResource()); assertEquals(Crn.ResourceType.RESOURCE_ROLE, testRole1.getResourceType()); assertEquals(ACCOUNT_ID, testRole2.getAccountId()); assertEquals(TEST_ROLE_2, testRole2.getResource()); assertEquals(Crn.ResourceType.RESOURCE_ROLE, testRole2.getResourceType()); }
public Crn getResourceRoleCrn(String resourceRoleName) { return getBaseIamCrnBuilder() .setResourceType(Crn.ResourceType.RESOURCE_ROLE) .setResource(resourceRoleName) .build(); }
GrpcUmsClient { public Crn getResourceRoleCrn(String resourceRoleName) { return getBaseIamCrnBuilder() .setResourceType(Crn.ResourceType.RESOURCE_ROLE) .setResource(resourceRoleName) .build(); } }
GrpcUmsClient { public Crn getResourceRoleCrn(String resourceRoleName) { return getBaseIamCrnBuilder() .setResourceType(Crn.ResourceType.RESOURCE_ROLE) .setResource(resourceRoleName) .build(); }  }
GrpcUmsClient { public Crn getResourceRoleCrn(String resourceRoleName) { return getBaseIamCrnBuilder() .setResourceType(Crn.ResourceType.RESOURCE_ROLE) .setResource(resourceRoleName) .build(); }  static GrpcUmsClient createClient(UmsConfig config, UmsClientConfig clientConfig, Tracer tracer); List<Group> listAllGroups(String actorCrn, String accountId, Optional<String> requestId); List<Group> listGroups(String actorCrn, String accountId, List<String> groupCrns, Optional<String> requestId); List<String> listGroupsForMember(String actorCrn, String accountId, String memberCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsUserCache", key = "{ #actorCrn, #userCrn }") User getUserDetails(String actorCrn, String userCrn, Optional<String> requestId); GetActorWorkloadCredentialsResponse getActorWorkloadCredentials(String actorCrn, String userCrn, Optional<String> requestId); List<User> listAllUsers(String actorCrn, String accountId, Optional<String> requestId); List<User> listUsers(String actorCrn, String accountId, List<String> userCrns, Optional<String> requestId); @Cacheable(cacheNames = "umsMachineUserCache", key = "{ #actorCrn, #userCrn }") MachineUser getMachineUserDetails(String actorCrn, String userCrn, String accountId, Optional<String> requestId); List<MachineUser> listAllMachineUsers(
            String actorCrn, String accountId, boolean includeInternal, Optional<String> requestId); List<MachineUser> listMachineUsers(
            String actorCrn, String accountId, List<String> machineUserCrns, boolean includeInternal, Optional<String> requestId); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) Optional<String> createMachineUser(String machineUserName, String userCrn, String accountId, Optional<String> requestId); void deleteMachineUser(String machineUserName, String userCrn, Optional<String> requestId); List<ServicePrincipalCloudIdentities> listServicePrincipalCloudIdentities(
            String actorCrn, String accountId, String environmentCrn, Optional<String> requestId); GetRightsResponse getRightsForUser(String actorCrn, String userCrn, String environmentCrn, Optional<String> requestId); List<String> listWorkloadAdministrationGroupsForMember(
            String actorCrn, String memberCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsAccountCache", key = "{ #actorCrn, #accountId }") Account getAccountDetails(String actorCrn, String accountId, Optional<String> requestId); @Cacheable(cacheNames = "umsUserRoleAssigmentsCache", key = "{ #actorCrn, #userCrn }") List<UserManagementProto.ResourceAssignment> listResourceRoleAssigments(String actorCrn, String userCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsUserRightsCache", key = "{ #userCrn, #right, #resource }") boolean checkRight(String actorCrn, String userCrn, String right, String resource, Optional<String> requestId); @Cacheable(cacheNames = "umsUserRightsCache", key = "{ #actorCrn, #userCrn, #right }") boolean checkRight(String actorCrn, String userCrn, String right, Optional<String> requestId); List<Boolean> hasRights(String actorCrn, String memberCrn, List<AuthorizationProto.RightCheck> rightChecks, Optional<String> requestId); String rightCheckToString(AuthorizationProto.RightCheck rightCheck); Map<String, Boolean> hasRights(String actorCrn, String memberCrn, List<String> resources, String right, Optional<String> requestId); @Cacheable(cacheNames = "umsResourceAssigneesCache", key = "{ #actorCrn, #userCrn, #resourceCrn }") List<UserManagementProto.ResourceAssignee> listAssigneesOfResource(String actorCrn, String userCrn,
            String resourceCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsAuthorizationEntitlementRegisteredCache", key = "{ #actorCrn, #accountId }") boolean isAuthorizationEntitlementRegistered(String actorCrn, String accountId); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) void assignMachineUserRole(String userCrn, String accountId, String machineUserCrn, String roleCrn, Optional<String> requestId); void unassignMachineUserRole(String userCrn, String machineUserCrn, String roleCrn, Optional<String> requestId); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) AltusCredential generateAccessSecretKeyPair(String actorCrn, String accountId, String machineUserCrn,
            Optional<String> requestId, UserManagementProto.AccessKeyType.Value accessKeyType); AltusCredential createMachineUserAndGenerateKeys(String machineUserName, String userCrn, String accountId, String roleCrn); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) AltusCredential createMachineUserAndGenerateKeys(String machineUserName, String userCrn, String accountId,
            String roleCrn, UserManagementProto.AccessKeyType.Value accessKeyType); void clearMachineUserWithAccessKeysAndRole(String machineUserName, String userCrn, String accountId, String roleCrn); void deleteMachineUserAccessKeys(String actorCrn, String accountId, String machineUserCrn, Optional<String> requestId); boolean doesMachineUserHasAccessKey(String actorCrn, String accountId,
            String machineUserCrn, String accessKeyId); List<AnonymizationRule> getAnonymizationRules(String accountId, String actorCrn); String getIdentityProviderMetadataXml(String accountId, String actorCrn); @Caching(evict = { @CacheEvict(cacheNames = {"umsUserRoleAssigmentsCache"}, key = "#userCrn"), @CacheEvict(cacheNames = {"umsResourceAssigneesCache"}, key = "#userCrn"), @CacheEvict(cacheNames = {"umsUserRightsCache"}, key = "{ #userCrn, #right, #resource }") }) void assignResourceRole(
            String userCrn, String resourceCrn, String resourceRoleCrn, Optional<String> requestId); void assignResourceOwnerRoleIfEntitled(String userCrn, String resourceCrn, String accountId); void unassignResourceRole(String userCrn, String resourceCrn, String resourceRoleCrn, Optional<String> requestId); void notifyResourceDeleted(String resourceCrn, Optional<String> requestId); String setWorkloadAdministrationGroupName(String actorCrn, String accountId, Optional<String> requestId, String right, String resource); String getWorkloadAdministrationGroupName(String actorCrn, String accountId, Optional<String> requestId, String right, String resource); void deleteWorkloadAdministrationGroupName(String actorCrn, String accountId, Optional<String> requestId, String right, String resource); List<UserManagementProto.WorkloadAdministrationGroup> listWorkloadAdministrationGroups(String actorCrn, String accountId,
            Optional<String> requestId); GetEventGenerationIdsResponse getEventGenerationIds(String actorCrn, String accountId, Optional<String> requestId); GetUserSyncStateModelResponse getUserSyncStateModel(
            String actorCrn, String accountId,
            List<UserManagementProto.RightsCheck> rightsChecks, Optional<String> requestId); String getBuiltInDatabusRoleCrn(); String getBuiltInOwnerResourceRoleCrn(); String getBuiltInEnvironmentAdminResourceRoleCrn(); Crn getResourceRoleCrn(String resourceRoleName); Crn getRoleCrn(String roleName); void setTracer(Tracer tracer); }
GrpcUmsClient { public Crn getResourceRoleCrn(String resourceRoleName) { return getBaseIamCrnBuilder() .setResourceType(Crn.ResourceType.RESOURCE_ROLE) .setResource(resourceRoleName) .build(); }  static GrpcUmsClient createClient(UmsConfig config, UmsClientConfig clientConfig, Tracer tracer); List<Group> listAllGroups(String actorCrn, String accountId, Optional<String> requestId); List<Group> listGroups(String actorCrn, String accountId, List<String> groupCrns, Optional<String> requestId); List<String> listGroupsForMember(String actorCrn, String accountId, String memberCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsUserCache", key = "{ #actorCrn, #userCrn }") User getUserDetails(String actorCrn, String userCrn, Optional<String> requestId); GetActorWorkloadCredentialsResponse getActorWorkloadCredentials(String actorCrn, String userCrn, Optional<String> requestId); List<User> listAllUsers(String actorCrn, String accountId, Optional<String> requestId); List<User> listUsers(String actorCrn, String accountId, List<String> userCrns, Optional<String> requestId); @Cacheable(cacheNames = "umsMachineUserCache", key = "{ #actorCrn, #userCrn }") MachineUser getMachineUserDetails(String actorCrn, String userCrn, String accountId, Optional<String> requestId); List<MachineUser> listAllMachineUsers(
            String actorCrn, String accountId, boolean includeInternal, Optional<String> requestId); List<MachineUser> listMachineUsers(
            String actorCrn, String accountId, List<String> machineUserCrns, boolean includeInternal, Optional<String> requestId); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) Optional<String> createMachineUser(String machineUserName, String userCrn, String accountId, Optional<String> requestId); void deleteMachineUser(String machineUserName, String userCrn, Optional<String> requestId); List<ServicePrincipalCloudIdentities> listServicePrincipalCloudIdentities(
            String actorCrn, String accountId, String environmentCrn, Optional<String> requestId); GetRightsResponse getRightsForUser(String actorCrn, String userCrn, String environmentCrn, Optional<String> requestId); List<String> listWorkloadAdministrationGroupsForMember(
            String actorCrn, String memberCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsAccountCache", key = "{ #actorCrn, #accountId }") Account getAccountDetails(String actorCrn, String accountId, Optional<String> requestId); @Cacheable(cacheNames = "umsUserRoleAssigmentsCache", key = "{ #actorCrn, #userCrn }") List<UserManagementProto.ResourceAssignment> listResourceRoleAssigments(String actorCrn, String userCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsUserRightsCache", key = "{ #userCrn, #right, #resource }") boolean checkRight(String actorCrn, String userCrn, String right, String resource, Optional<String> requestId); @Cacheable(cacheNames = "umsUserRightsCache", key = "{ #actorCrn, #userCrn, #right }") boolean checkRight(String actorCrn, String userCrn, String right, Optional<String> requestId); List<Boolean> hasRights(String actorCrn, String memberCrn, List<AuthorizationProto.RightCheck> rightChecks, Optional<String> requestId); String rightCheckToString(AuthorizationProto.RightCheck rightCheck); Map<String, Boolean> hasRights(String actorCrn, String memberCrn, List<String> resources, String right, Optional<String> requestId); @Cacheable(cacheNames = "umsResourceAssigneesCache", key = "{ #actorCrn, #userCrn, #resourceCrn }") List<UserManagementProto.ResourceAssignee> listAssigneesOfResource(String actorCrn, String userCrn,
            String resourceCrn, Optional<String> requestId); @Cacheable(cacheNames = "umsAuthorizationEntitlementRegisteredCache", key = "{ #actorCrn, #accountId }") boolean isAuthorizationEntitlementRegistered(String actorCrn, String accountId); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) void assignMachineUserRole(String userCrn, String accountId, String machineUserCrn, String roleCrn, Optional<String> requestId); void unassignMachineUserRole(String userCrn, String machineUserCrn, String roleCrn, Optional<String> requestId); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) AltusCredential generateAccessSecretKeyPair(String actorCrn, String accountId, String machineUserCrn,
            Optional<String> requestId, UserManagementProto.AccessKeyType.Value accessKeyType); AltusCredential createMachineUserAndGenerateKeys(String machineUserName, String userCrn, String accountId, String roleCrn); @Retryable(value = UmsOperationException.class, maxAttempts = 10, backoff = @Backoff(delay = 5000)) AltusCredential createMachineUserAndGenerateKeys(String machineUserName, String userCrn, String accountId,
            String roleCrn, UserManagementProto.AccessKeyType.Value accessKeyType); void clearMachineUserWithAccessKeysAndRole(String machineUserName, String userCrn, String accountId, String roleCrn); void deleteMachineUserAccessKeys(String actorCrn, String accountId, String machineUserCrn, Optional<String> requestId); boolean doesMachineUserHasAccessKey(String actorCrn, String accountId,
            String machineUserCrn, String accessKeyId); List<AnonymizationRule> getAnonymizationRules(String accountId, String actorCrn); String getIdentityProviderMetadataXml(String accountId, String actorCrn); @Caching(evict = { @CacheEvict(cacheNames = {"umsUserRoleAssigmentsCache"}, key = "#userCrn"), @CacheEvict(cacheNames = {"umsResourceAssigneesCache"}, key = "#userCrn"), @CacheEvict(cacheNames = {"umsUserRightsCache"}, key = "{ #userCrn, #right, #resource }") }) void assignResourceRole(
            String userCrn, String resourceCrn, String resourceRoleCrn, Optional<String> requestId); void assignResourceOwnerRoleIfEntitled(String userCrn, String resourceCrn, String accountId); void unassignResourceRole(String userCrn, String resourceCrn, String resourceRoleCrn, Optional<String> requestId); void notifyResourceDeleted(String resourceCrn, Optional<String> requestId); String setWorkloadAdministrationGroupName(String actorCrn, String accountId, Optional<String> requestId, String right, String resource); String getWorkloadAdministrationGroupName(String actorCrn, String accountId, Optional<String> requestId, String right, String resource); void deleteWorkloadAdministrationGroupName(String actorCrn, String accountId, Optional<String> requestId, String right, String resource); List<UserManagementProto.WorkloadAdministrationGroup> listWorkloadAdministrationGroups(String actorCrn, String accountId,
            Optional<String> requestId); GetEventGenerationIdsResponse getEventGenerationIds(String actorCrn, String accountId, Optional<String> requestId); GetUserSyncStateModelResponse getUserSyncStateModel(
            String actorCrn, String accountId,
            List<UserManagementProto.RightsCheck> rightsChecks, Optional<String> requestId); String getBuiltInDatabusRoleCrn(); String getBuiltInOwnerResourceRoleCrn(); String getBuiltInEnvironmentAdminResourceRoleCrn(); Crn getResourceRoleCrn(String resourceRoleName); Crn getRoleCrn(String roleName); void setTracer(Tracer tracer);  }