Skip to content

Commit

Permalink
Revert "JavaScript (v3): MediaConvert - Remove DescribeEndpoints exam…
Browse files Browse the repository at this point in the history
…ple." (awsdocs#6987)

Revert "JavaScript (v3): MediaConvert - Remove DescribeEndpoints example. (#6…"

This reverts commit e8600ce.
  • Loading branch information
meyertst-aws authored Oct 17, 2024
1 parent 0850306 commit b2e5d50
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions javascriptv3/example_code/mediaconvert/src/emc_getendpoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/*
ABOUT THIS NODE.JS EXAMPLE: This example works with Version 3 (V3) of the AWS SDK for JavaScript,
which is scheduled for release by September 2020. The preview version of the SDK is available
at https://github.com/aws/aws-sdk-js-v3. The 'SDK for JavaScript Developer Guide' for v3 is also
scheduled for release September 2020, and the topic containing this example will be hosted at
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/emc-examples-getendpoint.html.
Purpose:
emc_getendpoint.js demonstrates how to retrieve information about the endpoints for an AWS account.
Running the code:
node emc_getendpoint.js
*/

// snippet-start:[mediaconvert.JavaScript.endoint.describeEndpointsV3]
// Import required AWS-SDK clients and commands for Node.js
import { DescribeEndpointsCommand } from "@aws-sdk/client-mediaconvert";
import { emcClientGet } from "./libs/emcClientGet.js";

//set the parameters.
const params = { MaxResults: 0 };

const run = async () => {
try {
// Create a new service object and set MediaConvert to customer endpoint
const data = await emcClientGet.send(new DescribeEndpointsCommand(params));
console.log("Your MediaConvert endpoint is ", data.Endpoints);
return data;
} catch (err) {
console.log("Error", err);
}
};
run();
// snippet-end:[mediaconvert.JavaScript.endoint.describeEndpointsV3]
// For unit tests only.
// module.exports ={run, params};

0 comments on commit b2e5d50

Please sign in to comment.