Aws-cli: هل يمكن لأي شخص مساعدتي في إنشاء جدول DynamoDB باستخدام فهرس ثانوي محلي باستخدام AWS cli؟

تم إنشاؤها على ١٦ يونيو ٢٠١٦  ·  3تعليقات  ·  مصدر: aws/aws-cli

guidance service-api

التعليق الأكثر فائدة

aws dynamodb create-table --table-name XYZ - تعريفات السمة AttributeName = Id، AttributeType = N AttributeName = Name، AttributeType = S - key-schema AttributeName = Id، KeyType = HASH AttributeName = Name، KeyType = RANGE - -provisioned-throughput ReadCapacityUnits = 5، WriteCapacityUnits = 5 - Local-Secondary-indexes 'IndexName = idx1، KeySchema = [{AttributeName = Id، KeyType = HASH}، {AttributeName = Name، KeyType = RANGE}]، Projection = { نوع الإسقاط = الكل} '

ال 3 كومينتر

بالنسبة إلى LSI ، يمكنك استخدام --local-secondary-indexes 'IndexName=string,KeySchema=[{AttributeName=string,KeyType=string},{AttributeName=string,KeyType=string}],Projection={ProjectionType=string,NonKeyAttributes=[string,string]}' في مكالمتك create-table .

إذا كنت لا تزال تواجه مشكلات ، فتفضل بالدردشة معنا في غرفة النوم لدينا. إغلاق لصالح gitter.

مرحبًا Jamesls ،

aws dynamodb create-table --table-name XYZ - تعريفات السمة AttributeName = Id، AttributeType = N AttributeName = Name، AttributeType = S AttributeName = Gender، AttributeType = S - key-schema AttributeName = Id، KeyType = HASH AttributeName = الاسم ، KeyType = RANGE - توفير معدل نقل البيانات ReadCapacityUnits = 5 ، WriteCapacityUnits = 5 - اسم الفهرس المحلي - الثانوي - الفهرس = سلسلة ، KeySchema = [{AttributeName = Gender، KeyType = RANGE} ، {AttributName = Id، KeyType = HASH}] ، الإسقاط = {ProjectionType = ALL} '

لقد استخدمت الكود أعلاه لإنشاء جدول. لكني أتلقى الخطأ:

_Error تحليل المعلمة '--local-Secondary-indexes': المتوقع: '=' ، المستلمة: "
للإدخال:
'IndexName = string، KeySchema = [{AttributeName = Gender، KeyType = RANGE}، {AttributName =
المعرّف ، KeyType = HASH}] ، الإسقاط = {ProjectionType = ALL} '_

شكرا لدعمك

aws dynamodb create-table --table-name XYZ - تعريفات السمة AttributeName = Id، AttributeType = N AttributeName = Name، AttributeType = S - key-schema AttributeName = Id، KeyType = HASH AttributeName = Name، KeyType = RANGE - -provisioned-throughput ReadCapacityUnits = 5، WriteCapacityUnits = 5 - Local-Secondary-indexes 'IndexName = idx1، KeySchema = [{AttributeName = Id، KeyType = HASH}، {AttributeName = Name، KeyType = RANGE}]، Projection = { نوع الإسقاط = الكل} '

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات