com.amazonaws.services.identitymanagement.model.GetRoleResult Java Examples
The following examples show how to use
com.amazonaws.services.identitymanagement.model.GetRoleResult.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AwsIamServiceTest.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void validRole() { String roleArn = "account/validRole"; Role expectedRole = new Role().withArn(roleArn); GetRoleResult getRoleResult = mock(GetRoleResult.class); when(getRoleResult.getRole()).thenReturn(expectedRole); when(iam.getRole(any(GetRoleRequest.class))).thenReturn(getRoleResult); ValidationResultBuilder validationRequestBuilder = new ValidationResultBuilder(); Role role = awsIamService.getRole(iam, roleArn, validationRequestBuilder); assertThat(role.getArn()).isEqualTo(roleArn); assertThat(validationRequestBuilder.build().hasError()).isFalse(); }
Example #2
Source File: AwsIamConnector.java From titus-control-plane with Apache License 2.0 | 4 votes |
private Mono<GetRoleResult> getAwsIamRole(String iamRoleName) { GetRoleRequest request = new GetRoleRequest().withRoleName(iamRoleName); return AwsReactorExt.toMono(request, iamClient::getRoleAsync); }
Example #3
Source File: RoleImpl.java From aws-sdk-java-resources with Apache License 2.0 | 4 votes |
@Override public boolean load(GetRoleRequest request, ResultCapture<GetRoleResult> extractor) { return resource.load(request, extractor); }
Example #4
Source File: Role.java From aws-sdk-java-resources with Apache License 2.0 | 2 votes |
/** * Makes a call to the service to load this resource's attributes if they * are not loaded yet, and use a ResultCapture to retrieve the low-level * client response * The following request parameters will be populated from the data of this * <code>Role</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>RoleName</code></b> * - mapped from the <code>Name</code> identifier. * </li> * </ul> * * <p> * * @return Returns {@code true} if the resource is not yet loaded when this * method was invoked, which indicates that a service call has been * made to retrieve the attributes. * @see GetRoleRequest */ boolean load(GetRoleRequest request, ResultCapture<GetRoleResult> extractor) ;