com.amazonaws.services.simplesystemsmanagement.model.GetParameterResult Java Examples
The following examples show how to use
com.amazonaws.services.simplesystemsmanagement.model.GetParameterResult.
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 |
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: ParameterStoreSource.java From spring-boot-parameter-store-integration with MIT License | 6 votes |
private void validate(String propertyName, GetParameterResult getParameterResult) { String requestId = getParameterResult.getSdkResponseMetadata().getRequestId(); int statusCode = getParameterResult.getSdkHttpMetadata().getHttpStatusCode(); if (statusCode != 200) { throw new ParameterStoreError(propertyName, String.format("Invalid response code '%s' received from AWS. AWS Request ID : '%s'.", statusCode, requestId)); } if (getParameterResult.getParameter() == null) { throw new ParameterStoreError(propertyName, String.format("A null Parameter was received from AWS. AWS Request ID : '%s'.", requestId)); } if (getParameterResult.getParameter().getValue() == null) { throw new ParameterStoreError(propertyName, String.format("A null Parameter value was received from AWS. AWS Request ID : '%s'.", requestId)); } }
Example #3
Source File: ParameterStoreSourceTest.java From spring-boot-parameter-store-integration with MIT License | 5 votes |
private GetParameterResult getGetParameterResult() { GetParameterResult getParameterResult = new GetParameterResult(); getParameterResult.setSdkHttpMetadata(sdkHttpMetadataMock); getParameterResult.setSdkResponseMetadata(responseMetadataMock); return getParameterResult; }
Example #4
Source File: AMQPClient.java From amazon-mq-workshop with Apache License 2.0 | 4 votes |
public static String getUserPassword(String key) { GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest() .withName(key)); return parameterResult.getParameter().getValue(); }
Example #5
Source File: MQTTClient.java From amazon-mq-workshop with Apache License 2.0 | 4 votes |
public static String getUserPassword(String key) { GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest() .withName(key)); return parameterResult.getParameter().getValue(); }
Example #6
Source File: AmazonMqClient.java From amazon-mq-workshop with Apache License 2.0 | 4 votes |
public static String getUserPassword(String key) { GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest() .withName(key)); return parameterResult.getParameter().getValue(); }
Example #7
Source File: StompClient.java From amazon-mq-workshop with Apache License 2.0 | 4 votes |
public static String getUserPassword(String key) { GetParameterResult parameterResult = AWSSimpleSystemsManagementClientBuilder.defaultClient().getParameter(new GetParameterRequest() .withName(key)); return parameterResult.getParameter().getValue(); }