AWS Code Sample
Catalog

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

getEndpointURL.java

getEndpointURL.java demonstrates how to get mediaconvert account endpoint URL.

/* * Copyright 2011-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://aws.amazon.com/apache2.0 * * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES * OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and * limitations under the License. */ package com.example.mediaconvert; import java.util.Iterator; import software.amazon.awssdk.core.exception.SdkException; import software.amazon.awssdk.services.mediaconvert.MediaConvertClient; import software.amazon.awssdk.services.mediaconvert.model.DescribeEndpointsRequest; import software.amazon.awssdk.services.mediaconvert.model.DescribeEndpointsResponse; import software.amazon.awssdk.services.mediaconvert.model.Endpoint; /** * Get MediaConvert service endpoint URL */ public class getEndpointURL { public static void main(String[] args) { try { MediaConvertClient mc = MediaConvertClient.builder().build(); DescribeEndpointsResponse res = mc .describeEndpoints(DescribeEndpointsRequest.builder().maxResults(20).build()); Iterator<Endpoint> endpoints = res.endpoints().iterator(); while (endpoints.hasNext()) { System.out.println(endpoints.next().url()); } } catch (SdkException e) { System.out.println(e.toString()); } finally { } } }

Sample Details

Service: mediaconvert

Author: azhchris

Type: full-example

On this page: