Search in sources :

Example 1 with ParameterMetadata

use of com.amazonaws.services.simplesystemsmanagement.model.ParameterMetadata in project aws-doc-sdk-examples by awsdocs.

the class GetSimpleSystemsManagementParas method main.

public static void main(String[] args) {
    // snippet-start:[ssm.Java1.get_params.main]
    AWSSimpleSystemsManagement ssm = AWSSimpleSystemsManagementClientBuilder.standard().withRegion(Regions.DEFAULT_REGION).build();
    try {
        DescribeParametersRequest desRequest = new DescribeParametersRequest();
        desRequest.setMaxResults(10);
        DescribeParametersResult results = ssm.describeParameters(desRequest);
        List<ParameterMetadata> params = results.getParameters();
        // Iterate through the list
        Iterator<ParameterMetadata> tagIterator = params.iterator();
        while (tagIterator.hasNext()) {
            ParameterMetadata paraMeta = (ParameterMetadata) tagIterator.next();
            System.out.println(paraMeta.getName());
            System.out.println(paraMeta.getDescription());
        }
    } catch (AmazonServiceException e) {
        e.getStackTrace();
    }
// snippet-end:[ssm.Java1.get_params.main]
}
Also used : DescribeParametersResult(com.amazonaws.services.simplesystemsmanagement.model.DescribeParametersResult) DescribeParametersRequest(com.amazonaws.services.simplesystemsmanagement.model.DescribeParametersRequest) AmazonServiceException(com.amazonaws.AmazonServiceException) AWSSimpleSystemsManagement(com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement) ParameterMetadata(com.amazonaws.services.simplesystemsmanagement.model.ParameterMetadata)

Aggregations

AmazonServiceException (com.amazonaws.AmazonServiceException)1 AWSSimpleSystemsManagement (com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement)1 DescribeParametersRequest (com.amazonaws.services.simplesystemsmanagement.model.DescribeParametersRequest)1 DescribeParametersResult (com.amazonaws.services.simplesystemsmanagement.model.DescribeParametersResult)1 ParameterMetadata (com.amazonaws.services.simplesystemsmanagement.model.ParameterMetadata)1