public class AwsIotWebSocketUrlSigner extends Object
| Constructor and Description | 
|---|
AwsIotWebSocketUrlSigner(String endpoint)
Instantiates a new URL signer instance with endpoint only. 
 | 
AwsIotWebSocketUrlSigner(String endpoint,
                        String region)
Instantiate a new URL signer with endpoint and region. 
 | 
AwsIotWebSocketUrlSigner(String endpoint,
                        String awsAccessKeyId,
                        String awsSecretAccessKey,
                        String sessionToken)
Instantiates a new URL signer instance with endpoint and credentials. 
 | 
AwsIotWebSocketUrlSigner(String endpoint,
                        String awsAccessKeyId,
                        String awsSecretAccessKey,
                        String sessionToken,
                        String region)
Instantiates a new URL signer instance with endpoint and credentials. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getRegion()  | 
String | 
getSignedUrl(Date signingDate)
Given the signing date return a signed connection URL to be used when
 connecting via WebSocket to AWS IoT. 
 | 
void | 
updateCredentials(String awsAccessKeyId,
                 String awsSecretAccessKey,
                 String sessionToken)
Updates the signing credentials. 
 | 
public AwsIotWebSocketUrlSigner(String endpoint)
endpoint - service endpoint with or without customer specific URL prefix.public AwsIotWebSocketUrlSigner(String endpoint, String region)
endpoint - service endpoint with or without customer specific URL prefix.region - The AWS regionpublic AwsIotWebSocketUrlSigner(String endpoint, String awsAccessKeyId, String awsSecretAccessKey, String sessionToken)
endpoint - service endpoint with or without customer specific URL prefix.awsAccessKeyId - AWS access key ID used in SigV4 signature algorithm.awsSecretAccessKey - AWS secret access key used in SigV4 signature algorithm.sessionToken - Session token for temporary credentials.public AwsIotWebSocketUrlSigner(String endpoint, String awsAccessKeyId, String awsSecretAccessKey, String sessionToken, String region)
endpoint - service endpoint with or without customer specific URL prefix.awsAccessKeyId - AWS access key ID used in SigV4 signature algorithm.awsSecretAccessKey - AWS secret access key used in SigV4 signature algorithm.sessionToken - Session token for temporary credentials.region - The AWS regionpublic void updateCredentials(String awsAccessKeyId, String awsSecretAccessKey, String sessionToken)
awsAccessKeyId - AWS access key ID used in SigV4 signature algorithm.awsSecretAccessKey - AWS secret access key used in SigV4 signature algorithm.sessionToken - Session token for temporary credentials.public String getSignedUrl(Date signingDate) throws AWSIotException
signingDate - time value to be used in SigV4 calculations. System current
            time will be used if null.AWSIotException - Exception thrown when signed URL can be generated with given
             information.public String getRegion()
Copyright © 2020. All rights reserved.