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

项目:cerberus-lifecycle-cli    文件:IdentityManagementService.java   
/**
 * Uploads a server certificate to AWS IAM.
 *
 * @param name The server certificate name.  No spaces.
 * @param path Path to store the certificate under.
 * @param body PEM-encoded certificate body.
 * @param chain PEM-encoded certificate chain.
 * @param key PEM-encoded certificate key.
 * @return The server certificate ID of the uploaded certificate.
 */
public String uploadServerCertificate(
        final String name,
        final String path,
        final String body,
        final String chain,
        final String key) {
    final UploadServerCertificateRequest request = new UploadServerCertificateRequest()
            .withServerCertificateName(name)
            .withPath(sanitizePath(path))
            .withCertificateBody(body)
            .withCertificateChain(chain)
            .withPrivateKey(key);

    final UploadServerCertificateResult result = client.uploadServerCertificate(request);

    return result.getServerCertificateMetadata().getServerCertificateId();
}
项目:gravity    文件:AwsAutomationAction.java   
public String loadSSLCertificate( 
        String certificateName, 
        String certificate, 
        String privateKey,
        String path){

    String certificateId = this.getCertificateId(certificateName);
    if(certificateId==null){

        UploadServerCertificateRequest certificateRequest =
            new UploadServerCertificateRequest( certificateName, certificate, privateKey);
        certificateRequest.setPath(path);

        UploadServerCertificateResult uploadServerCertificate = 
            getIdentityClient().uploadServerCertificate(certificateRequest);

        certificateId = uploadServerCertificate.getServerCertificateMetadata().getServerCertificateId();
    }
    return certificateId;

}
项目:cmn-project    文件:IAM.java   
public ServerCertificate createServerCert(UploadServerCertificateRequest request) throws InterruptedException {
    logger.info("create server cert, path={}, name={}", request.getPath(), request.getServerCertificateName());
    UploadServerCertificateResult result = iam.uploadServerCertificate(request);
    return new ServerCertificate(result.getServerCertificateMetadata(), request.getCertificateBody())
        .withCertificateChain(request.getCertificateChain());
}