File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
javascriptv3/example_code/mediaconvert/src Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+ // SPDX-License-Identifier: Apache-2.0
3+
4+ /*
5+ ABOUT THIS NODE.JS EXAMPLE: This example works with Version 3 (V3) of the AWS SDK for JavaScript,
6+ which is scheduled for release by September 2020. The preview version of the SDK is available
7+ at https://github.com/aws/aws-sdk-js-v3. The 'SDK for JavaScript Developer Guide' for v3 is also
8+ scheduled for release September 2020, and the topic containing this example will be hosted at
9+ https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/emc-examples-getendpoint.html.
10+
11+ Purpose:
12+ emc_getendpoint.js demonstrates how to retrieve information about the endpoints for an AWS account.
13+
14+ Running the code:
15+ node emc_getendpoint.js
16+ */
17+
18+ // snippet-start:[mediaconvert.JavaScript.endoint.describeEndpointsV3]
19+ // Import required AWS-SDK clients and commands for Node.js
20+ import { DescribeEndpointsCommand } from "@aws-sdk/client-mediaconvert" ;
21+ import { emcClientGet } from "./libs/emcClientGet.js" ;
22+
23+ //set the parameters.
24+ const params = { MaxResults : 0 } ;
25+
26+ const run = async ( ) => {
27+ try {
28+ // Create a new service object and set MediaConvert to customer endpoint
29+ const data = await emcClientGet . send ( new DescribeEndpointsCommand ( params ) ) ;
30+ console . log ( "Your MediaConvert endpoint is " , data . Endpoints ) ;
31+ return data ;
32+ } catch ( err ) {
33+ console . log ( "Error" , err ) ;
34+ }
35+ } ;
36+ run ( ) ;
37+ // snippet-end:[mediaconvert.JavaScript.endoint.describeEndpointsV3]
38+ // For unit tests only.
39+ // module.exports ={run, params};
You can’t perform that action at this time.
0 commit comments