com.amazonaws.services.simplesystemsmanagement.model.GetParameterRequest Java Examples

The following examples show how to use com.amazonaws.services.simplesystemsmanagement.model.GetParameterRequest. 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: SsmUtil.java    From herd-mdl with Apache License 2.0 6 votes vote down vote up
private static Parameter getParameter(String parameterKey, boolean isEncrypted) {
    LOGGER.info("get ssm parameter key:" + parameterKey);
    AWSCredentialsProvider credentials = InstanceProfileCredentialsProvider.getInstance();
    AWSSimpleSystemsManagement simpleSystemsManagementClient =
        AWSSimpleSystemsManagementClientBuilder.standard().withCredentials(credentials)
            .withRegion(Regions.getCurrentRegion().getName()).build();
    GetParameterRequest parameterRequest = new GetParameterRequest();
    parameterRequest.withName(parameterKey).setWithDecryption(isEncrypted);
    GetParameterResult parameterResult = simpleSystemsManagementClient.getParameter(parameterRequest);
    return parameterResult.getParameter();
}
 
Example #2
Source File: AMQPClient.java    From amazon-mq-workshop with Apache License 2.0 4 votes vote down vote up
public static String getUserPassword(String key) {
    GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest()
        .withName(key));
    return parameterResult.getParameter().getValue();
}
 
Example #3
Source File: MQTTClient.java    From amazon-mq-workshop with Apache License 2.0 4 votes vote down vote up
public static String getUserPassword(String key) {
    GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest()
        .withName(key));
    return parameterResult.getParameter().getValue();
}
 
Example #4
Source File: AmazonMqClient.java    From amazon-mq-workshop with Apache License 2.0 4 votes vote down vote up
public static String getUserPassword(String key) {
    GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest()
        .withName(key));
    return parameterResult.getParameter().getValue();
}
 
Example #5
Source File: StompClient.java    From amazon-mq-workshop with Apache License 2.0 4 votes vote down vote up
public static String getUserPassword(String key) {
    GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest()
        .withName(key));
    return parameterResult.getParameter().getValue();
}
 
Example #6
Source File: ParameterStoreSourceTest.java    From spring-boot-parameter-store-integration with MIT License 4 votes vote down vote up
private GetParameterRequest getParameterRequest(String parameterName)
{
    return new GetParameterRequest().withName(parameterName).withWithDecryption(true);
}