Cách tạo Cổng API trong Python
Amazon API Gateway giúp các nhà phát triển cung cấp phần cuối của ứng dụng web và di động mạnh mẽ, an toàn và có thể mở rộng. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS Show import boto3 client = boto3.client('apigateway') These are the available methods
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }996 ( operation_name )¶ Kiểm tra xem một hoạt động có thể được phân trang Tham số tên_hoạt động (chuỗi) -- Tên hoạt động. Đây là tên giống như tên phương thức trên máy khách. Ví dụ: nếu tên phương thức là{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }997 và bạn thường gọi thao tác là { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }998, nếu thao tác { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }997 có thể được phân trang, bạn có thể sử dụng lệnh gọi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2900. Trả về { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2901 nếu thao tác có thể được phân trang, ngược lại là { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2902. { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2903 ()¶ Đóng các kết nối điểm cuối cơ bản { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2904 ( **kwargs )¶ Tạo tài nguyên ApiKey Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }34Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } } Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2915 ( **kwargs )¶ Thêm tài nguyên Trình ủy quyền mới vào tài nguyên RestApi hiện có Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }9Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }29 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2979 ( **kwargs )¶ Tạo một tài nguyên BasePathMapping mới Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }13Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }14 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2986 ( **kwargs )¶ Tạo tài nguyên Triển khai, làm cho RestApi được chỉ định có thể gọi được qua internet Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }22Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }24 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2999 ( **kwargs )¶ Tạo một phần tài liệu Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }37Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }340 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }1417 ( **kwargs )¶ Tạo một phiên bản tài liệu Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }341Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }342 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }1424 ( **kwargs )¶ Tạo một tên miền mới Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }343Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }344 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }1457 ( **kwargs )¶ Thêm tài nguyên Mô hình mới vào tài nguyên RestApi hiện có Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }345Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }346 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }1466 ( **kwargs )¶ Tạo một RequestValidator của một RestApi nhất định Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }347Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }348 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }1479 ( **kwargs )¶ Tạo một tài nguyên Tài nguyên Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }349Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }0 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2263 ( **kwargs )¶ Creates a new RestApi resource Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }1Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2297 ( **kwargs )¶ Creates a new Stage resource that references a pre-existing Deployment for the API Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }3Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }4 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2431 ( **kwargs )¶ Tạo kế hoạch sử dụng với giới hạn hạn ngạch và điều tiết, cũng như các giai đoạn API được liên kết, được chỉ định trong tải trọng Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }5Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }6 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2439 ( **kwargs )¶ Tạo khóa gói sử dụng để thêm khóa API hiện có vào gói sử dụng Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }7Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }8 Cấu trúc phản hồi
ngoại lệ
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }2447 ( **kwargs )¶ Tạo một liên kết VPC, trong tài khoản của người gọi ở một khu vực đã chọn, trong một hoạt động không đồng bộ thường mất 2-4 phút để hoàn thành và đi vào hoạt động. Người gọi phải có quyền tạo và cập nhật các dịch vụ VPC Endpoint Xem thêm. Tài liệu API AWS Cú pháp yêu cầu { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }9Thông số
mệnh lệnh trả lạiCú pháp phản hồi { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ], 'tags': { 'string': 'string' } }90 Cấu trúc phản hồi
|