簡體   English   中英

在哪里可以查看 AWS 開發工具包函數的代碼?

[英]Where can I see the code for the AWS SDK function?

例如,當我像這樣使用此功能時

// snippet-start:[s3.JavaScript.buckets.createBucket]
// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'REGION'});

// Create S3 service object
s3 = new AWS.S3({apiVersion: '2006-03-01'});

// Create the parameters for calling createBucket
var bucketParams = {
  Bucket : process.argv[2]
};

// call S3 to create the bucket
s3.createBucket(bucketParams, function(err, data) {
  if (err) {
    console.log("Error", err);
  } else {
    console.log("Success", data.Location);
  }
});

我想看看實現該功能的代碼 當我查看 AWS 開發工具包代碼時,我沒有比更深入的了。

在哪里可以查看 AWS 開發工具包函數的代碼?

.d.ts文件不是代碼,它們只是類型定義

如果您查看已找到的s3.js文件旁邊的s3.d.ts文件,您會看到它調用了require('../lib/services/s3')

查看該文件以找到代碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM