use of com.aliyuncs.ram.model.v20150501.DeletePublicKeyRequest in project aliyun-oss-java-sdk by aliyun.
the class AuthUtils method deletePublicKey.
/**
* Delete the uploaded public key.
*
* @param regionId
* RAM's available area.
* @param accessKeyId
* Access Key ID of the root user.
* @param accessKeySecret
* Secret Access Key of the root user.
* @param publicKeyId
* Public Key Id.
* @throws ClientException
*/
public static void deletePublicKey(String regionId, String accessKeyId, String accessKeySecret, String publicKeyId) throws ClientException {
DefaultProfile profile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret);
DefaultAcsClient client = new DefaultAcsClient(profile);
DeletePublicKeyRequest deletePublicKeyRequest = new DeletePublicKeyRequest();
deletePublicKeyRequest.setUserPublicKeyId(publicKeyId);
client.getAcsResponse(deletePublicKeyRequest);
}
Aggregations