Java 类com.amazonaws.services.identitymanagement.model.DeleteRolePolicyRequest 实例源码

项目:cmn-project    文件:DeleteInstanceProfileTask.java   
@Override
public void execute(Context context) throws Exception {
    String name = resource.remoteInstanceProfile.getInstanceProfileName();

    logger.info("delete instance profile and related role and policy, name={}", name);
    if (!resource.remoteInstanceProfile.getRoles().isEmpty()) { // if the associated role doesn't exist anymore, skip to delete (this is not expected state, cmn create role for every instance profile)
        AWS.iam.iam.removeRoleFromInstanceProfile(new RemoveRoleFromInstanceProfileRequest()
            .withInstanceProfileName(name)
            .withRoleName(name));
        AWS.iam.iam.deleteRolePolicy(new DeleteRolePolicyRequest().withRoleName(name).withPolicyName(name));
        AWS.iam.iam.deleteRole(new DeleteRoleRequest().withRoleName(name));
    }
    AWS.iam.iam.deleteInstanceProfile(new DeleteInstanceProfileRequest().withInstanceProfileName(name));
}
项目:aws-sdk-java-resources    文件:RolePolicyImpl.java   
@Override
public void delete(DeleteRolePolicyRequest request) {
    delete(request, null);
}
项目:aws-sdk-java-resources    文件:RolePolicyImpl.java   
@Override
public void delete(DeleteRolePolicyRequest request, ResultCapture<Void>
        extractor) {

    resource.performAction("Delete", request, extractor);
}
项目:aws-sdk-java-resources    文件:RolePolicy.java   
/**
 * Performs the <code>Delete</code> action.
 *
 * <p>
 * The following request parameters will be populated from the data of this
 * <code>RolePolicy</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>RoleName</code> identifier.
 *   </li>
 *   <li>
 *     <b><code>PolicyName</code></b>
 *         - mapped from the <code>Name</code> identifier.
 *   </li>
 * </ul>
 *
 * <p>
 *
 * @see DeleteRolePolicyRequest
 */
void delete(DeleteRolePolicyRequest request);
项目:aws-sdk-java-resources    文件:RolePolicy.java   
/**
 * Performs the <code>Delete</code> action and use a ResultCapture to
 * retrieve the low-level client response.
 *
 * <p>
 * The following request parameters will be populated from the data of this
 * <code>RolePolicy</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>RoleName</code> identifier.
 *   </li>
 *   <li>
 *     <b><code>PolicyName</code></b>
 *         - mapped from the <code>Name</code> identifier.
 *   </li>
 * </ul>
 *
 * <p>
 *
 * @see DeleteRolePolicyRequest
 */
void delete(DeleteRolePolicyRequest request, ResultCapture<Void> extractor);