@@ -0,0 +1,2725 @@
+//snippet-sourcedescription:%5BgetEndpointURL.java demonstrates how to get mediaconvert account endpoint URL.%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// snippet-start:%5Bmediaconvert.java.getendpointurl.complete%5D%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.getendpointurl.import%5D%0Aimport java.util.Iterator;%0Aimport software.amazon.awssdk.core.exception.SdkException;%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.Endpoint;%0A// snippet-end:%5Bmediaconvert.java.getendpointurl.import%5D%0A%0A/**%0A * Get MediaConvert service endpoint URL%0A */%0A%0A// snippet-start:%5Bmediaconvert.java.getendpointurl.main%5D%0Apublic class GetEndpointURL %7B%0A    public static void main(String%5B%5D args) %7B%0A        try %7B%0A            // snippet-start:%5Bmediaconvert.java.getendpointurl.build_mediaconvertclient%5D%0A            MediaConvertClient mc = MediaConvertClient.builder().build();%0A            // snippet-end:%5Bmediaconvert.java.getendpointurl.build_mediaconvertclient%5D%0A%0A            getEndpoint(mc) ;%0A%0A        %7D catch (SdkException e) %7B%0A            System.out.println(e.toString());%0A        %7D%0A%0A    %7D%0A    // snippet-start:%5Bmediaconvert.java.getendpointurl.retrieve_endpoints%5D%0A    public static void getEndpoint(MediaConvertClient mc) %7B%0A%0A            DescribeEndpointsResponse res = mc%0A                    .describeEndpoints(DescribeEndpointsRequest.builder().maxResults(20).build());%0A%0A            Iterator%3CEndpoint%3E endpoints = res.endpoints().iterator();%0A            while (endpoints.hasNext()) %7B%0A                System.out.println(endpoints.next().url());%0A            %7D%0A            // snippet-end:%5Bmediaconvert.java.getendpointurl.retrieve_endpoints%5D%0A     %7D%0A%7D%0A// snippet-end:%5Bmediaconvert.java.getendpointurl.main%5D%0A// snippet-end:%5Bmediaconvert.java.getendpointurl.complete%5D%0A

Create GetEndpointURL.java