@@ -0,0 +1,3220 @@
+//snippet-sourcedescription:%5BGetJob.java demonstrates how to get information about a specific MediaConvert job.%5D%0A//snippet-keyword:%5BSDK for Java 2.0%5D%0A//snippet-keyword:%5BCode Sample%5D%0A//snippet-service:%5BAWS Elemental MediaConvert%5D%0A//snippet-sourcetype:%5Bfull-example%5D%0A//snippet-sourcedate:%5B7/30/2020%5D%0A//snippet-sourceauthor:%5Bsmacdon - AWS %5D%0A%0A/*%0A * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at:%0A *%0A *    http://aws.amazon.com/apache2.0%0A *%0A * This file is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES%0A * OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.example.mediaconvert;%0A%0A// snippet-start:%5Bmediaconvert.java.get_job.import%5D%0Aimport software.amazon.awssdk.core.exception.SdkException;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.mediaconvert.model.GetJobRequest;%0Aimport software.amazon.awssdk.services.mediaconvert.MediaConvertClient;%0Aimport software.amazon.awssdk.services.mediaconvert.model.DescribeEndpointsRequest;%0Aimport software.amazon.awssdk.services.mediaconvert.model.DescribeEndpointsResponse;%0Aimport software.amazon.awssdk.services.mediaconvert.model.GetJobResponse;%0Aimport java.net.URI;%0A// snippet-end:%5Bmediaconvert.java.get_job.import%5D%0A%0Apublic class GetJob %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        final String USAGE = %22%5Cn%22 +%0A                %22GetJob %3CjobId%3E %5Cn%5Cn%22 +%0A                %22Where:%5Cn%22 +%0A                %22  jobId - the job id value.%5Cn%5Cn%22 ;%0A%0A        if (args.length %3C 1) %7B%0A              System.out.println(USAGE);%0A              System.exit(1);%0A          %7D%0A%0A        String jobId = args%5B0%5D;%0A%0A        Region region = Region.US_WEST_2;%0A        MediaConvertClient mc = MediaConvertClient.builder()%0A                .region(region)%0A                .build();%0A%0A        getSpecificJob(mc, jobId);%0A    %7D%0A%0A    // snippet-start:%5Bmediaconvert.java.get_job.main%5D%0A    public static void getSpecificJob(MediaConvertClient mc, String jobId) %7B%0A%0A        try %7B%0A        DescribeEndpointsResponse res = mc.describeEndpoints(DescribeEndpointsRequest.builder()%0A                        .maxResults(20)%0A                        .build());%0A%0A        if (res.endpoints().size() %3C= 0) %7B%0A            System.out.println(%22Cannot find MediaConvert service endpoint URL!%22);%0A            System.exit(1);%0A        %7D%0A        String endpointURL = res.endpoints().get(0).url();%0A%0A        MediaConvertClient emc = MediaConvertClient.builder()%0A                .region(Region.US_WEST_2)%0A                .endpointOverride(URI.create(endpointURL))%0A                .build();%0A%0A        GetJobRequest jobRequest = GetJobRequest.builder()%0A                .id(jobId)%0A                .build();%0A%0A        GetJobResponse response = emc.getJob(jobRequest);%0A        System.out.println(%22The ARN of the job is %22+response.job().arn());%0A%0A    %7D catch (SdkException e) %7B%0A        System.out.println(e.toString());%0A    %7D%0A    // snippet-end:%5Bmediaconvert.java.get_job.main%5D%0A   %7D%0A%7D%0A

Create GetJob.java