use of software.amazon.awssdk.services.cloudfront.model.DescribeFunctionResponse in project aws-doc-sdk-examples by awsdocs.
the class DescribeFunction method describeSinFunction.
// snippet-start:[cloudfront.java2.des_function.main]
public static String describeSinFunction(CloudFrontClient cloudFrontClient, String functionName) {
try {
DescribeFunctionRequest functionRequest = DescribeFunctionRequest.builder().name(functionName).stage(FunctionStage.DEVELOPMENT).build();
DescribeFunctionResponse functionResponse = cloudFrontClient.describeFunction(functionRequest);
return functionResponse.eTag();
} catch (CloudFrontException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
return "";
}
Aggregations